RedirectPermanent sous condition
Bonjour à tous.
Voilà je travaille en multi-domaine sur un hebergement.
J'ai donc un seul htaccess pour plusieurs domaine.
Aujourd'hui j'aimerai mettre en place de redirection permanent en fonction du domaine.
Dans l'esprit:
SI:
http://www.ndd1.com/b-presentation.html
ALORS
http://www.ndd1.com/a-presentation.html
SI:
http://www.ndd2.com/a-presentation.html
ALORS:
http://www.ndd2.com/b-presentation.html
J'ai donc pensé utilisé un RedirectPermanent précedé de RewriteCond
Code:
1 2 3 4 5 6
|
RewriteCond %{HTTP_HOST} ^ndd1.com$
RedirectPermanent /b-presentation.html http://www.ndd1.com/a-presentation.html
RewriteCond %{HTTP_HOST} ^ndd2.com$
RedirectPermanent /a-presentation.html http://www.ndd2.com/b-presentation.html |
Mais sauf erreur de symthaxe de ma part cela ne semble pas fonctionner
Auriez vous une correction, Solution?????