Here's my requirement for redirecting in Nginx -
Redirect Example
1. www.example.com/gaming.html -> www.example.com/gaming-zone.html
No Redirect example (when params are present, dont redirect)
2. www.example.com/gaming.html?name=foo -> www.example.com/gaming.html?name=foo
I have a very simple redirect setup up -
rewrite ^/gaming.html$ /gaming-zone.html redirect;
which satisfies example 1 but redirects example 2 as well. Can someone please share how to fix the rule so that URLs containing params are not redirected?