Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

One website lots of domains

Posted on 2014-03-19
8
Medium Priority
?
199 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 85

Assisted Solution

by:ozo
ozo earned 200 total points
ID: 39940913
Yes.
0
 
LVL 1

Author Comment

by:movieprodw
ID: 39940917
Awesome!

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

Accepted Solution

by:
Ray Paseur earned 1800 total points
ID: 39940928
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:movieprodw
ID: 39940941
Thank you Ray.

Can you please give me an example of the DNS I should use
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39940950
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
ID: 39940977
Thank you
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39940984
Thanks for the points! ~Ray
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39941165
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

783 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