cesarcesar Posted July 13, 2008 Share Posted July 13, 2008 Hi all, I want to set up one hosting account and access it via multiple domain names. Each different domain name will server the user slightly different content without the user knowing about the other domains. How do i do this? Example: User comes to my hosting account via www.siteA.com. The whole time the user is on the site the base URL never changes from www.siteA.com. The user needs to see www.siteA.com/page1.php as so on. (Actually i plan to use ModRewrite to alter the page name, but that comes later.) Now when another user comes to www.siteB.com they need go to the same hosting account and see the site as if they have no clue about www.siteA.com, just with some different content. Tested: I have tried using a .htaccess Symlink, but this will not work as it just redirects like a 301. Similar with CNAME's at my registrar. Tested: Frame Forwarding via hosting account. This doesn't work since the forwarded URL doesn't change from the base URL. Meaning, www.siteA.com never changes to www.siteA.com/page1.php. Also any links show the forwarded to's URL in the status bar. I hope my detail in description has been enough and someone has a great suggestion for me. Thanks much. CEsar Link to comment https://forums.phpfreaks.com/topic/114554-using-mulpitle-domains-for-one-hosting-account/ Share on other sites More sharing options...
chronister Posted July 13, 2008 Share Posted July 13, 2008 You should be able to designate where each domain points to through your host. I use 1&1 currently... but will be changing soon. In the 1&1 control panel I can point the domains to a particular directory. I have about 60 domains pointing to 1 directory which then hits a php redirect to bring the user to our main site. We bought all names related to our business so that others cannot use them. I don't want to set up sites for each one, so they all point to a root dir, and in that dir there is an index.php file that redirects. I assume that the control panel is the friendly way of manipulating the v-host file on the server. Link to comment https://forums.phpfreaks.com/topic/114554-using-mulpitle-domains-for-one-hosting-account/#findComment-589061 Share on other sites More sharing options...
cesarcesar Posted July 14, 2008 Author Share Posted July 14, 2008 chronister - thanks for your suggestion. What are you doing to the vhost to get it to work? Link to comment https://forums.phpfreaks.com/topic/114554-using-mulpitle-domains-for-one-hosting-account/#findComment-589792 Share on other sites More sharing options...
chronister Posted July 14, 2008 Share Posted July 14, 2008 1&1 is a little different as it provides a control panel for me to edit the destination and DNS settings for a domain rather than having to edit the files directly. What host are you using? If you have access to your v-host.conf file (it may be named different), you can set something up like this... vhost.conf NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "C:\xampp\htdocs\testing" ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot "C:\xampp\htdocs\xampp" ServerName xampp </VirtualHost> This is a VERY simple version and is probably not completely right... but it works for me on my laptop for a testing machine. Link to comment https://forums.phpfreaks.com/topic/114554-using-mulpitle-domains-for-one-hosting-account/#findComment-589849 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.