Multiple domain names for one site

Rickman

New member
Joined
Oct 27, 2003
Messages
2
I've got the following question:

I've registered 1 domainname (www.domain1.com) + an hosting account at my hosting provider. I've regisitered 3 extra domains (www.domain2.com, www.domain3.com and www.domain4.com) which should point to same host as www.domain1.com is pointing.

Now I could make domain pointers in DirectAdmin for this, but this is not what I want because if I type for example:

http://www.domain4.com/test.html

in my browser, my browser is being redirected to:

http://www.domain1.com/test.html.

I just want the hostname to stay the same. The reason why I want this, is because I've created a site framework in PHP which show different information on the site when a different hostname is being used.

I was hoping some of you can help me?
 
Last edited:
I just realised I posted the in the wrong forum. This should off course be in 'How do I .....? (User)'.

My apologies! :(
 
go into the main sites apache config file. Ppart of the data in the cionfig should show something similar to this:

ServerName www.domain.com
ServerAlias domain.com \
domain2.co.uk www.domain2.co.uk
ServerAdmin [email protected]


notice the line under ServerAlias has domain2.com not domain.com, in this case your main domain is domain.com and your second (alias) domain is domain2.com.

domain.com/page.php
is the same as
domain.com/page.php

domain2.com/anotherpage.php
is the same as
domain.com/anotherpage.php

domain.com/directory/directory2/file.php
is the same as
domain.com/directory/directory2/file.php

same with your cgi-bin and everything else.

Hope this helps you :)

Chris
 
Back
Top