<div dir="ltr">I currently do this in my location block<br>location ~ .*\.php$ {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!-f $request_filename) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 404;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fastcgi_pass&nbsp;&nbsp; <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fastcgi_index&nbsp;&nbsp; index.php;<br>}<br><br>This way when it goes to process the php files if it is not found then returns a 404 instead of passing it onto php and getting the no input file error.<br><br><br><div class="gmail_quote">
On Mon, Aug 4, 2008 at 8:06 PM, Rt Ibmer <span dir="ltr">&lt;<a href="mailto:rtibmx@yahoo.com">rtibmx@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">&gt; purposely request a PHP page that doesn&#39;t exist (as a<br>
&gt; test) the browser returns &quot;No input file<br>
&gt; specified.&quot; instead of the standard 404 page?<br>
&gt;<br>
</div><div class="Ih2E3d">&gt; You need<br>
&gt; &nbsp; &nbsp; fastcgi_intercept_errors &nbsp;on;<br>
<br>
</div>Thanks. I did that, but then had to also use the error_page directive to point it at my 404.php page.<br>
<br>
However this has the undesirable effect of then changing the URL in the browser to 404.php.<br>
<br>
Is there a way I can have nginx return the content of my 404.php page as the output, so the user still sees their bad page in the URL (i.e. <a href="http://www.mysite.com/badpage.php" target="_blank">http://www.mysite.com/badpage.php</a> instead of <a href="http://www.mysite.com/404.php" target="_blank">http://www.mysite.com/404.php</a>)?<br>

<br>
Thank you.<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div><br></div>