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.
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.