Remove Query String in Nginx

Last updated on April 1st, 2020 at 12:15 pm

I’ve removed and uninstall the some plugins, and I would like to prevent it display some error or 404, so I apply this way to nginx.conf redirection.

If you want to redirect permanent, then you can use 302.


if ($query_string ~ "^(.*)amp(.*)$") {
    return 301 $uri;
}

Tags:

1 thought on “Remove Query String in Nginx”

Comments are closed.

Discover more from Juzhax Technology

Subscribe now to keep reading and get access to the full archive.

Continue reading