Web Hosting Talk







View Full Version : 2 domains to 1 site


Matthew.A
03-22-2001, 11:22 AM
I did a search and found some stuff on this - but nothing conclusive. Can anyone explain to me in plain english how to do this on my RAQ 4, do I set up each domain on it's own in the control panel, then delete the website and use the ln command (?how!) or do I use a c-nam records?

ghengismark
03-22-2001, 01:28 PM
As far as I know... you just make sure there is a DNS etnry for each, both pointing to the same IP. You then create one, and (in the site settings) add to it's web alias and email alias the domain of the other. Works for me.

Chicken
03-23-2001, 01:31 AM
Pointing to the other domain to the IP address is the easy way, but note that the server will rewrite the URL. Other than this, you could crate symbolic links, or redirect the domain via .htaccess/other method, etc.

I've been unable to get a simple redirect script I used to have work on the RaQ4r. I guess it doesn't matter, but I like it as it was quick and easy and did what I needed it to do. So sad.

Matthew.A
03-23-2001, 06:30 AM
Ok - I've found one way which seems to work using the LN (link command)....

(This example points the .com site to it's .co.uk counterpart)
1) Setup your websites as normal so you end up with two seperate dirs to upload too
2) Login to your server and SU as root
3) "CD /home/sites"
4) Identify the site name you want to point too, and the site you want to point to that. e.g. Site2=www.mysite.co.uk and Site6=www.mysite.com
5) Rename the site to redirect (just in case!) "MV Site6 Site6Old"
6) Link the none existant dir Site6 to point to Site2 "LN -s /home/sites/Site2 Site6"

That's it - works perfectly (it seems) and keeps the correct domain name up. You can see an axample at http://www.bid4adomain.co.uk and http://www.bid4adomain.com which points to it (just a test site)

[Edited by Matthew.A on 03-26-2001 at 09:24 AM]

Cael
03-24-2001, 06:45 AM
Are you sure it is working?

NOC from tera-byte told me it won't work. Although I don't think he is skilled in this kind of things.

Matthew.A
03-24-2001, 06:52 AM
Well I believe it is working - as I've done it and tested it and it seems to work...Unless anyone can tell me why it shouldn't work?

Cael
03-24-2001, 01:13 PM
Don't know, anyone ?

Chicken
03-24-2001, 02:04 PM
Seems to workto me. I don't see why it wouldn't, ultimately, creating a symbolic link from one place to another works, and I'm not sure why they don't think this would work?

projo
03-24-2001, 04:47 PM
6) Link the none existant dir Site6 to point to Site2 "LN -s Site6 Site2"

I have done this also and it worked under Red Hat 6.2.

However, please correct me if I am wrong but shouldn't it be:

LN -s Site2 Site6

in the style of :

LN -s target link-to-create

Gary

Matthew.A
03-26-2001, 10:23 AM
(Sorry for the late reply - cable modems buggered!)

>>However, please correct me if I am wrong but shouldn't it be:
LN -s Site2 Site6
in the style of :
LN -s target link-to-create

Opps - yes you are correct :) well I hope it helps someone (and I'll edit my original message so no misundestandsings)

Matthew.A
03-27-2001, 01:32 PM
Think I may of found a small problem... The log rotationnow throws up an error every night :- How can I get round this?