Solved

One website lots of domains

Posted on 2014-03-19
8
185 Views
Last Modified: 2014-03-19
Hello,

I have a large database of vehicle data.

I currently have 5 websites that are Make Model specific and I am going to make about 30 more.

I want to keep them all separate websites with separate domains.

I literally just copy and paste the code and change the website id in the config file and it runs off the db fully.

Is there a graceful way to run all of the sites off one website?

For-instance, let's say that I have:
websiteA.com
websiteB.com
websiteC.com
websiteD.com

can all of those DNS point to mainwebsite.com and I could say in the php or htaccess that if domain name X then load website X without ever changing the domain name, so it always looks like the domain name is specific to that vehicle.

Running LAMP

Thanks,
Matt
0
Comment
Question by:movieprodw
8 Comments
 
LVL 84

Assisted Solution

by:ozo
ozo earned 50 total points
Comment Utility
Yes.
0
 
LVL 1

Author Comment

by:movieprodw
Comment Utility
Awesome!

Any tips or clues of to do this :-)
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 450 total points
Comment Utility
You can detect the URL used to access your web site.  The full URL is in:

$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']

Compare this to your selection of web sites and you will be OK 99.99% of the time.
0
 
LVL 1

Author Comment

by:movieprodw
Comment Utility
Thank you Ray.

Can you please give me an example of the DNS I should use
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
I don't think any special DNS would be needed -- just point all of the registered URLs to the same web server.
0
 
LVL 1

Author Closing Comment

by:movieprodw
Comment Utility
Thank you
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
Thanks for the points! ~Ray
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
I had one client that had about 20 websites using the same code.  They even got a wildcard SSL cert that covered all of them.  They used Ray's method along with some htaccess code to make sure they all operated properly with the same code.  You can even put a different image or header up by detecting the URL that way.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now