$request_uri for subrequest

Sebastian Krebs krebs.seb at gmail.com
Sun Aug 10 11:12:17 UTC 2014


I have problems setting up SSI with NGinx and PHP5-FPM. The problem I have
is (indrectly) related to this rule

fastcgi_param REQUEST_URI $request_uri;

During the SSI-subrequest the variable $request_uri still points to the URI
used for the initial request. Asking me, this behavior is questionable
anyway. However, now I have issues finding the _real_ request uri for the
subrequest, because when I use $uri instead, the request itself works, but
this also uses the already rewritten.

I've started with the common pattern for a Symfony2 project [1]. When I set

fastcgi_param REQUEST_URI $uri$is_args$args

Nginx passes the full path name /app.php/foo/bar for _every_ request, even
if it's not wanted.

Is there's a reliable way to determine the original subrequest uri? Is it
possible, that the behaviour of $request_uri for SSI can be treated as bug?

Thanks for your attention,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140810/5835582c/attachment.html>

More information about the nginx mailing list