Link to home
Start Free TrialLog in
Avatar of bathazar
bathazar

asked on

301 redirect with more than one domain... in .htaccess

My hosted parked more than domain such as:

abc.com
bcd.com
efg.travel

I have this to do 301 redirect:

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.efg\.travel [NC]
RewriteRule ^(.*)$ http://www.efg.travel/$1 [L,R=301]

But i want use this redirect for another domain which is parked to the same host.
I used this code:

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.efg\.travel [NC]
RewriteRule ^(.*)$ http://www.efg.travel/$1 [L,R=301]
RewriteCond %{HTTP_HOST} !^www\.abc\.com [NC]
RewriteRule ^(.*)$ http://www.abc.com/$1 [L,R=301]

But it does not work. Can you solve my problem for me ? Thank u very much.
ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bathazar
bathazar

ASKER

Yeah ! Thank u so much !