On Sun, May 25, 2008 at 3:43 AM, Floren Munteanu &lt;<a href="mailto:nginx@yqed.com">nginx@yqed.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p>There is something wrong, when I try to access this
location, for example:</p>

<p><a href="http://localhost/forum" target="_blank">http://localhost/forum</a></p>

<p>&nbsp;</p>

<p>Normally, if I access the above URL, it will
automatically add at the end a slash:</p>

<p><a href="http://localhost/forum/" target="_blank">http://localhost/forum/</a></p>

<p>&nbsp;</p>

<p>The page displays OK. How would I automatically add a /
at the end of each URL, only if it misses and an actual file is not called from
URL? For example:</p>

<p><a href="http://localhost/forum" target="_blank">http://localhost/forum</a>
will turn into <a href="http://localhost/forum/" target="_blank">http://localhost/forum/</a>
while <a href="http://localhost/forum/test.php" target="_blank">http://localhost/forum/test.php</a>
remains unchanged.</p>

<p>&nbsp;</p></div></div></blockquote><div><br>if (-f $request_filename/index.html) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite (.*) $1/index.html break;<br>}<br><br>put that in appropriately, and add an &quot;or&quot; if you want to for index.php as well...<br>
<br>-jf<br></div></div><br>--<br>In the meantime, here is your PSA:<br>&quot;It&#39;s so hard to write a graphics driver that open-sourcing it would not help.&quot;<br> -- Andrew Fear, Software Product Manager, NVIDIA Corporation<br>
<a href="http://kerneltrap.org/node/7228">http://kerneltrap.org/node/7228</a>