"apache rewrite - get original url in php" Answer’s

0

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']
Wednesday, March 31, 2021
 
dzm
answered 11 Months ago
dzm
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :