• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

One website lots of domains

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
movieprodw
Asked:
movieprodw
2 Solutions
 
ozoCommented:
Yes.
0
 
movieprodwAuthor Commented:
Awesome!

Any tips or clues of to do this :-)
0
 
Ray PaseurCommented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
movieprodwAuthor Commented:
Thank you Ray.

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

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now