<div dir="ltr">I currently do this in my location block<br>location ~ .*\.php$ {<br> if (!-f $request_filename) {<br> return 404;<br> }<br> fastcgi_pass <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;<br>
fastcgi_index 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"><<a href="mailto:rtibmx@yahoo.com">rtibmx@yahoo.com</a>></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">> purposely request a PHP page that doesn't exist (as a<br>
> test) the browser returns "No input file<br>
> specified." instead of the standard 404 page?<br>
><br>
</div><div class="Ih2E3d">> You need<br>
> fastcgi_intercept_errors 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>