taking user from domain1.com to domain2.com (simple q)

Using a single web hosting account to host multiple sites

taking user from domain1.com to domain2.com (simple q)

Postby brill.us » Tue Mar 13, 2007 12:23 pm

Hey Guys,

I have two domains

domain1.com (old domain)

and

domain2.com (new domain)

I have people still requesting:

http://www.domain1.com/webhosting/ss/index.php (sometimes without the index.php)

I would like all that domain1.com stuff to go to:

http://www.domain2.com/hosting/linux.php

----- More stuff ---

domain1.com is pointed to domain2.com via IP, so if you go to domain1.com you still end up at domain2.com.

However, if you are requesting:

www.domain1.com/webhosting/ss/ -- it doesnt work and shows a 404
so I would like a rule that takes the customer from:

www.domain1.com/webhosting/ss/ to: www.domain2.com/hosting/linux.php

How would I do this?

Thanks guys!
brill.us
 
Posts: 16
Joined: Sun Mar 11, 2007 2:57 pm

Postby richardk » Wed Mar 14, 2007 8:49 am

Do you want domain1.com/* to domain2.com/hosting/linux.php?
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?doamin1\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain2.com/hosting/linux.php? [R=301,L]


Or just domain1.com/webhosting/ss/* to domain2.com/hosting/linux.php?
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?doamin1\.com$ [NC]
RewriteRule ^webhosting/ss(/.*)?$ http://www.domain2.com/hosting/linux.php? [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby brill.us » Wed Mar 14, 2007 11:11 am

Thanks man -- works great.
brill.us
 
Posts: 16
Joined: Sun Mar 11, 2007 2:57 pm


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 18 guests

cron