Forum Moderators: phranque

Message Too Old, No Replies

.htaccess & subdomains

htaccess, subdomains

         

kwblue

3:04 am on Sep 23, 2005 (gmt 0)

10+ Year Member



I couldn't find what I was looking for, so thought I would post...

I have a domain:

mydomain.com

I also have to websites which are:

website1.com - is pointed to www.mydomain.com/w1

website2.com - is pointed to www.mydomain.com/w2

I have changed the .htaccess to make website1 go to [website1.com...] even if [website1.com...] is entered.

How, though, can I change it so that when someone types in [mydomain.com...] that it doesn't view the website, but forwards it to: [website1.com?...]

Thanks in advance and I hope that was clear :)

kwblue

kwblue

3:13 pm on Sep 23, 2005 (gmt 0)

10+ Year Member



I got that part to work with:

RewriteEngine On

RedirectMatch permanent ^/w1$ [w1.com...]

RedirectMatch permanent ^/w2$ [w2.com...]

NOW, I need:

w1.mydomain.com to forward to www.w1.com AND
w2.mydomain.com to forward to www.w2.com

Help!