meilleur exemple pour une RW RULE

This commit is contained in:
gcolpart 2017-11-07 18:58:57 +01:00
parent c5f540fafe
commit 44cd3c6601

View file

@ -485,7 +485,7 @@ RedirectMatch ^/$ /sub/
RewriteRule ^/(.*) http://new.example.com/$1 [L,R=permanent]
RewriteCond %{REQUEST_URI} !^/foo.txt
RewriteCond %{REQUEST_URI} !^/.well-known/pki-validation/
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
# le drapeau NC pour ne pas tenir compte de la casse
@ -498,8 +498,6 @@ RewriteRule ^/foo.txt [L,F]
# Pour forcer le https
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R=permanent]
~~~
Pour supprimer un Query String avec une Rewrite Rule : <https://www.philipphoffmann.de/blog/2012/08/16/how-to-discard-the-query-string-in-a-rewriterule-apache-mod_rewrite/>