Aucun résumé des modifications |
|||
| Ligne 1 : | Ligne 1 : | ||
{{#seo:|keywords=Apache,WEB}} | |||
== Redirect https to http == | == Redirect https to http == | ||
{{syntaxhighlight |lang=text |code= | {{syntaxhighlight |lang=text |code= | ||
# Redirect HTTPS to HTTP | # Redirect HTTPS to HTTP | ||
RewriteCond %{HTTP:X-Forwarded-Proto} =https | RewriteCond %{HTTP:X-Forwarded-Proto} =https | ||
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [ | RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA] | ||
}} | |||
== Redirect http to https == | |||
{{syntaxhighlight |lang=text |code= | |||
# Redirect HTTP to HTTPS | |||
RewriteCond %{HTTPS} off | |||
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [QSA] | |||
}} | }} | ||
# Redirect HTTPS to HTTP
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA]
# Redirect HTTP to HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [QSA]