Created
July 31, 2023 09:04
-
-
Save 7ute/418a5a4ac2cbb999f243ec06ab7b55fc to your computer and use it in GitHub Desktop.
Redirect and strip query parameters in NGINX
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
if ($request_uri ~ "([^\?]*)\?unwantedParam=(.*)") { | |
rewrite ^ "https://www.example.org?" permanent; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment