website logo
Auteur
avatar
killing

Forum » » Le coin des codeurs » » Redirection


Posté : 2 févr. 2007 à 18:04 icone du post

Bon je vous livre le code (qui fonctionne) intégré dans le .htaccess:


RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{HTTP_HOST} !^www.ssiap.com(:80)?$ [NC]
RewriteCond %{HTTP_HOST} !^ssiap.com(:80)?$ [NC]
RewriteRule ^(.*) http://www.ssiap.com/$1 [L,R=301]

RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{HTTP_HOST} !^www.ssiap.com(:80)?$ [NC]
RewriteCond %{HTTP_HOST} !^ssiap.com(:80)?$ [NC]
RewriteRule ^(.*) https://www.ssiap.com/$1 [L,R=301]




Message édité par : killing / 02-02-2007 23:45


Cet article provient de NPDS
https://www.npds.org/viewtopic.php?topic=21878&forum=5