Web Hosting Talk







View Full Version : URL Redirection Question


driverdave
10-18-2001, 11:06 PM
I have a raq4i. Need to do this

sitea.com
siteb.com

sitea.com is a website. We update it etc...
siteb.com is a mirror of sitea.com.

We want people to be able to go to both sites and see the same content (sitea.com), but see diferent urls in their browsers.

Like, when someone types in siteb.com, they still see siteb.com throughtout the visit.

The only way I've found to do such a thing, is to change DocumentRoot of siteb.com to that of sitea.com in httpd.conf.

The cobalt GUI does not seem to care for this at all.

Is there any other way to achieve this? I've read my apache book and found nothing. Any help would be appreciated.

I don't like it when my cobalt GUI is mad at me. I'm afraid of what it might do!

NewonNet
10-19-2001, 03:24 AM
Easily done.

Setup only vsite for sitea.com

setup dns for both

put include statement at the end of our httpd.conf to point to another file. In this file, create the structure of httpd.conf <VirtualHost> for site b pointing to the same folder as sitea.

That's it.

I have this setup also.

driverdave
10-19-2001, 04:55 AM
Would john@sitea.com get email addressed to josh@siteb.com? thats the main reason I set up 2 vsites through the GUI.

That's a good idea though. Maybe if I add siteb in the email server list in site settings for sitea.

I'll give it a try. Thanks!

NewonNet
10-19-2001, 05:37 AM
I think that should work.

driverdave
10-19-2001, 02:29 PM
I'm sorry, it was a late night last night. I remeber the real reason we set up both sitea and siteb in the GUI.

We need stats on both sites. We can't have an actual re-direct
(re-write siteb.com to sitea.com), because the searchengines do not like it.

We need to have sitea and siteb appear to be different sites. I'm not sure how the webalizer.pkg handles it when there is a site in httpd.conf virtual hosts config, but not in /home/sites

I think webalizer goes through the directories in /home/sites when it's compiling stats. I'd hate to have to re-config webalizer.

texasweb
10-19-2001, 04:48 PM
Set up sitea and siteb.

telnet/ssh into server

mv siteb directory to bakup somewhere

ln -sd sitea siteb

driverdave
10-19-2001, 06:23 PM
Ahhh... I believe that will keep the stats in place.

Here is what I did.

/home/www.siteb.com/web is a symlink to /home/www.sitea.com/web

I left users and logs for siteb alone, cause I think thats where the stats get stored.

This should work. Thanks!

driverdave
10-19-2001, 07:24 PM
Ahhhhhrrrrggggg...

symlinks screw up the Cobalt Migration Utility.

You can't win :(