uwsgi
uwsgi copied to clipboard
Preserve query_string(when present) when making redirect
Is it possible to preserve query string(which is optional) when making 301 redirect within internal routing rules?
For example:
route = ^/best-product$ redirect-301:/worst-product
It works fine, but I could not find a way to pass query string to target url only when query string is actual present. I cannot just make
route = ^/best-product$ redirect-301:/worst-product?{QUERY_STRING}
because query string is empty in most cases and target url would just end with question mark
/best-product -> /worst-product?