One website lots of domains


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:

can all of those DNS point to 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

Who is Participating?
Ray PaseurConnect With a Mentor Commented:
You can detect the URL used to access your web site.  The full URL is in:


Compare this to your selection of web sites and you will be OK 99.99% of the time.
ozoConnect With a Mentor Commented:
movieprodwAuthor Commented:

Any tips or clues of to do this :-)
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

movieprodwAuthor Commented:
Thank you Ray.

Can you please give me an example of the DNS I should use
Ray PaseurCommented:
I don't think any special DNS would be needed -- just point all of the registered URLs to the same web server.
movieprodwAuthor Commented:
Thank you
Ray PaseurCommented:
Thanks for the points! ~Ray
Dave BaldwinFixer of ProblemsCommented:
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.
All Courses

From novice to tech pro — start learning today.