.htaccess/PHP5 (as CGI) problem
am 31.12.2004 22:11:14 von ncfOk, I'm working on a custom PHP installation on a shared host. I
installed everything correctly and .phpx scripts work. But if I try to
use a mod_rewrite in the .htaccess file to redirect all non-existant
files to a 404.php file (i.e., http://domain/non-existant-file.phpx
will print out "No input file specified"), Apache acts like the phpx
files do not exist. I have included the PHP section of my .htaccess
file.
I will NOT be able to check back here as my news reader isn't back up
and running yet, so it would be much appreciated if any replies were
sent to my email. My email is available in the header of this message.
(Unfortunately, Google will not let me remove my email from the header)
Thanks in advance for any and all help!
-Wes
###USE A CUSTOM PHP5 MODULE!!!
AddHandler custom-php .phpx
Action custom-php /cgi-bin/php5.cgi
#this next part was submitted by n74 at <
#it solves the "No input file specified" issue
RewriteEngine on
Rewritecond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule \.*$ /404.php
###Modified from \.php$ to \.*$ in order to catch all 404 errors