Created
July 23, 2020 17:04
-
-
Save bea-alec/1c672e6e27d11e5d550b376fe0f25b59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docroot/.htaccess b/docroot/.htaccess | |
index 9a73a3d..a48abe4 100644 | |
--- a/docroot/.htaccess | |
+++ b/docroot/.htaccess | |
@@ -69,6 +69,12 @@ AddEncoding gzip svgz | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
+ # Drop URL parameters for paths do not need them | |
+ RewriteCond %{THE_REQUEST} !help?|archive?|admin? | |
+ RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^?]*)\? | |
+ RewriteCond %{QUERY_STRING} !itok=([0-9]+) | |
+ RewriteRule (.*) /$1? [R=301,L] | |
+ | |
# Set "protossl" to "s" if we were accessed via https://. This is used later | |
# if you enable "www." stripping or enforcement, in order to ensure that | |
# you don't bounce between http and https. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment