Last active
July 21, 2020 19:14
-
-
Save bea-alec/e739ef41aaafac2a4ba8d2b800306512 to your computer and use it in GitHub Desktop.
mod_rewrite rules
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
# Drop URL parameters for paths do not need them | |
RewriteCond %{THE_REQUEST} \? | |
RewriteCond %{REQUEST_URI} !(^/help|/^admin|^archive) [NC] | |
RewriteCond %{QUERY_STRING} !itok=([0-9]+) | |
RewriteRule ^ %{REQUEST_URI} [L,R,QSD] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I updated and tested this code and it looks to work locally. I was also able to stop it from reverting to /index.php for certain conditions.