cancel
Showing results for 
Search instead for 
Did you mean: 

Multi domain hosting

N/A

Multi domain hosting

Ive already got a domain pointing at cgi and would like to know if its possible to have multi accounts pointing at the cgi?

I dont want the domain names pointing at the same thing but different directories on the cgi server. At pressent im using index.php to redirect to the subdirectory /portal/ . Could I somehow point www.anotherdomain.info to /anothersubdirectory/ still on the cgi server. I dont want to use the webserver frame option. If so could someone good with php write whats needed, or would this be a .htaccess tweak!!! god knows but here's hoping.

Cheers
4 REPLIES
LiamM
Grafter
Posts: 5,636
Registered: 12-08-2007

Multi domain hosting

i'm pretty sure this can be done if you transfer the domain in to be hosted by Plusnet (DNS Only though I recommend).
Community Veteran
Posts: 14,469
Registered: 30-07-2007

Multi domain hosting

The issue here is not the hosting but getting the domains pointing to separate web areas (directories) on the cgi server which is currently not possible via the domain control panel. Hence the request to know how to do with with php or .htaccess

You could use a redirect in .htaccess which is explained in General: .htaccess tutorial.
N/A

Multi domain hosting

There are four possible ways here.

1: Frame forwarding. Usual crap system

2: PHP inclusion. Most search engine friendly, but can get tricky to manage

3: PHP forwarding. Search engine friendly for the most part, but some don't like it

4: .htaccess. By far the best. It works like item 2, but you have to be wary about how your customer call the page, and how PHP thinks the page was called.


RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.being.hosted.co.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/hosting_directory/(.*) [NC]
RewriteRule ^(.*)$ /hosting_directory/$1 [L]


Replace "domain.being.hosted.co.uk" with your domain name you are hosting, and "hosting_directory" with the directory your files are in.

Any requests to the webserver, and it will think you are visiting http://domain.being.hosted.co.uk/hosting_directory/images/logo.gif - But the user will just see http://domain.being.hosted.co.uk/images/logo.gif
N/A

Multi domain hosting

my god I would have guessed that little snippit of code
thanks again acarr i'll give it a try as soon as the domains on pn