Forum Moderators: phranque

Message Too Old, No Replies

Redirecting parked domains in .htaccess

redirect parked domains to languages specific pages

         

ibizavenue

3:59 am on Mar 25, 2009 (gmt 0)

10+ Year Member



Hello,

I would like to redirect parked domains to language specific pages.

I currently have the following in my .htaccess file.

RewriteCond %{HTTP_HOST} !^(www\.)?example\.com$ [NC]
RewriteRule ^(.*)$ [example...] [R=301]

This redirects all of my parked domains to my french pages. That is

[french-parked-domain.com...] --> http://www.example.com/fre
[english-parked-domain.com...] --> http://www.example.com/fre
[another-english-domain.com...] --> http://www.example.com/fre

I would like to have the following

[french-parked-domain.com...] --> http://www.example.com/fre
[english-parked-domain.com...] --> http://www.example.com
[another-english-domain.com...] --> http://www.example.com

Any help is appreciated. Thank you.

g1smd

8:45 am on Mar 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Add another RewriteCond/RewriteRule pair ahead of this one, that redirects only for that one.

Modify the existing rule so that it does everything else. Make sure you add [L] to every rule.

ibizavenue

11:13 am on Mar 25, 2009 (gmt 0)

10+ Year Member



I had tried that but had missed adding the [L] on the rule above. Your note on adding the [L] drew my attention to this oversight - tried it and worked fine.

Thanks very much for your help.