PDA

View Full Version : domain name routing and htaccess


KenKnight
25th January 2007, 02:01
Hi all,

I have question regarding the routing of domain names that are pointed to a virtual server.

Let's say I've got MyDomainA.com pointed to a virtual server along with MyDomainB.com pointed to the same virtual server. Is it possible to MyDomainB.com to redirect to a folder on that server (ie MyDomainB.com/domainb/ )?

Maybe using an htaccess file or something?

I don't have access to the Vhosts file for this server, thats why I'm trying to find alternative methods.

Thanks,
Ken

falko
25th January 2007, 21:28
Take a look here: http://www.stevenhargrove.com/redirect-web-pages/

KenKnight
26th January 2007, 04:24
Thanks,

I've used php for header / location redirects for a long time, but didn't even think about just writing a main index.php with the header code to redirect based on $_SERVER["HOST"] variable.

Works like a champ.

Cheers!
Ken