When including a file with SSI that has a query string, the $uri and
$query_string variables are set to the included file. However, the
$request_uri variable remains set to the original file. Is this supposed
to
happen, or should $request_uri change?
An example follows, just be sure to change “root
/Users/larry/Sites/ngingx_request_uri/html;” to point to your local
copy.
Once you have created these files, go to
http://127.0.0.1:8084/example.html?page=1
nginx.conf
worker_processes 1;
events {
worker_connections 256;
}
http {
server {
listen 8084;
location / {
ssi on;
default_type text/html;
root /Users/larry/Sites/ngingx_request_uri;
}
}
}
example.html
$request_uri with SSIFrom example.html
$request_uri: :: $uri: :: $query_string:
fragment.inc
From fragment.inc
$request_uri: :: $uri: :: $query_string:
Shouldn't $request_uri be "/fragment.inc?page=1"?