Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Why nginx loses GET parameters in request_uri?

$
0
0
I need to add "/#" before every request in nginx (angular application with old browsers support).

I used following nginx rule to force hash symbol before $request_uri, but it loses everything after & char (returns only first GET parameter):

location ~* ^/[a-z0-9_\-\/]+$ {
return 301 /#$request_uri;
}

E.g. if i will request http://example.com/?p1=v1&p2=v2 i will get redirect to http://example.com/#/?p1=v1. p2 parameter is lost.

But following codel outputs $request_uri with all parameters:

location ~* ^/[a-z0-9_\-\/]+$ {
echo $request_uri;
}

Is it a bug? How this could be workarounded? I need all GET parameters.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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