Quantcast
Viewing all articles
Browse latest Browse all 2

Answer by Richard Smith for How to redirect with query string in Nginx

But the q parameter is empty on redirection.

I don't see that problem. When I test the configuration as written, it creates a redirection loop because the original keywords='value' is appended to the rewritten URI.

You can prevent rewrite from including any original parameters by appending a ? to the rewritten URI.

For example:

rewrite ^ /search?q=$arg_keywords? permanent;

See this document for details.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>