jeudi 30 avril 2015

Different rewrites for several different domains in htaccess

I'm trying to find a way make rewrite rules not to interfere with each other.

RewriteCond %{HTTP_HOST} ^(www\.)?domain1\.com
RewriteRule ^old-url.html(.*)$ /new-url-1/? [R=301,NC,L]

RewriteCond %{HTTP_HOST} ^(www\.)?domain2\.com
RewriteRule ^old-url.html(.*)$ /new-url-2/? [R=301,NC,L]

RewriteCond %{HTTP_HOST} ^(www\.)?domain3\.com
RewriteRule ^old-url.html(.*)$ /new-url-3/? [R=301,NC,L]

RewriteCond %{HTTP_HOST} ^(www\.)?domain4\.com
RewriteRule ^old-url.html(.*)$ /new-url-4/? [R=301,NC,L]

If I access, let's say http://ift.tt/1AjMebo I'm redirected to http://ift.tt/1ETUPsH

Any ideas? Thanks,

Aucun commentaire:

Enregistrer un commentaire