After re-reading the documentation page (<a href="http://wiki.codemongers.com/NginxHttpCoreModule#var_request_uri">http://wiki.codemongers.com/NginxHttpCoreModule#var_request_uri</a>), it turns out that &quot;$request_uri&quot; is indeed supposed to be the original request:
<br>&quot;<tt>$request_uri</tt>, this variable is equal to the complete initial URI together with the arguments;&quot;<br><br>Is there a variable like &quot;$request_uri&quot; that applies to the current request?<br>If not, the alternative is an &quot;if statement&quot; that checks to see whether &quot;$query_string&quot; has a value. If it does, use $uri?$query_string, otherwise use $uri.
<br><br><div class="gmail_quote">On Nov 10, 2007 4:04 PM, Larrytheliquid &lt;<a href="mailto:larrytheliquid@gmail.com">larrytheliquid@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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?
<br><br>An example follows, just be sure to change &quot;root /Users/larry/Sites/ngingx_request_uri/html;&quot; to point to your local copy. Once you have created these files, go to <a href="http://127.0.0.1:8084/example.html?page=1" target="_blank">

http://127.0.0.1:8084/example.html?page=1</a><br><br>
------------------------------------------------------<br>nginx.conf<br>------------------------------------------------------<br>worker_processes&nbsp; 1;<br>events {<br>&nbsp;&nbsp;&nbsp; worker_connections&nbsp; 256;<br>}<br><br>http {<br>&nbsp;&nbsp;&nbsp; server {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listen 8084;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location / {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ssi on;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default_type text/html;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root /Users/larry/Sites/ngingx_request_uri;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br><br>
------------------------------------------------------<br>example.html<br>
------------------------------------------------------<br clear="all">&lt;html&gt;<br>&nbsp; &lt;head&gt;<br>&nbsp;&nbsp;&nbsp; &lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;title&gt;$request_uri with SSI&lt;/title&gt;
<br>&nbsp; &lt;/head&gt;<br>&nbsp; &lt;body&gt;<br>&nbsp;&nbsp;&nbsp; &lt;h3&gt;From example.html&lt;/h3&gt;<br>&nbsp;&nbsp;&nbsp; &lt;p&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;strong&gt;$request_uri: &lt;/strong&gt;&lt;!--# echo var=&quot;request_uri&quot; --&gt; ::<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;strong&gt;$uri: &lt;/strong&gt;&lt;!--# echo var=&quot;uri&quot; --&gt; ::
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;strong&gt;$query_string: &lt;/strong&gt;&lt;!--# echo var=&quot;query_string&quot; --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/p&gt;<br>&nbsp;&nbsp;&nbsp; &lt;!--# include virtual=&quot;/fragment.inc?page=1&quot; --&gt;<br>&nbsp; &lt;/body&gt;<br>&lt;/html&gt;
<br><br>
------------------------------------------------------<br>
fragment.inc<br>

------------------------------------------------------<br>&lt;h3&gt;From fragment.inc&lt;/h3&gt;<br>&lt;p&gt;<br>&nbsp; &lt;strong&gt;$request_uri: &lt;/strong&gt;&lt;em&gt;&lt;!--# echo var=&quot;request_uri&quot; --&gt;&lt;/em&gt; ::
<br>&nbsp; &lt;strong&gt;$uri: &lt;/strong&gt;&lt;!--# echo var=&quot;uri&quot; --&gt; ::<br>&nbsp; &lt;strong&gt;$query_string: &lt;/strong&gt;&lt;!--# echo var=&quot;query_string&quot; --&gt;&nbsp; <br>&lt;/p&gt;<br>&lt;p&gt;Shouldn&#39;t $request_uri be &quot;&lt;em&gt;/fragment.inc?page=1&lt;/em&gt;&quot;?&lt;/p&gt;
<br><font color="#888888"><br>-- <br>Respectfully,<br>Larry Diehl<br><a href="http://www.larrytheliquid.com" target="_blank">www.larrytheliquid.com</a>
</font></blockquote></div><br><br clear="all"><br>-- <br>Respectfully,<br>Larry Diehl<br><a href="http://www.larrytheliquid.com">www.larrytheliquid.com</a>