Pergunta

i have set up many 301 redirects like this:

Redirect 301 /impressum http://mydomain.de/imprint

the problem is, i am running a magent multistore. now it redirects every domain, which leads to 404 errors. how can i limit the redirection to a certain domain?

Redirect 301 http://mydomain.de/impressum   http://mydomain.de/imprint

does not work.

Foi útil?

Solução

Try using mod_rewrite instead so you can match against a hostname:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.de$ [NC]
RewriteRule ^impressum(.*)$ http://mydomain.de/imprint$1 [L,R=301]
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top