I have a rewrite in nginx or Apache for this address:
http://domain.com/hello
to a script like
http://domain.com/test.php&a
In Nginx conf, we need to add user header with request_uri:
proxy_set_header request_uri $request_uri;
And read it in php:
echo $_SERVER['HTTP_REQUEST_URI'];
upd
for some reason nginx don't like symbol '_' in header name, don't know how it worked before, maybe something changed after nginx update. Now i'm using
proxy_set_header rewriteduri $request_uri;
and in php
$_SERVER['HTTP_REWRITEDURI']