Forum Moderators: phranque
I'm stumped by this. Any help would be appreciated.
The following .htaccess file works fine on my localhost:
AddHandler myhandler .html
Action myhandler /test.php
-When I upload it to an ISP, it doesn't work: I get a "page not found" error (the ISP's default 404 page).
Oddly, if I change the second line to:
Action myhandler /test.html
Then it works, bringing up the test.html page. Both test.php and test.html are definitely in the same folder.
Is it possible the path for a PHP file is figured differently, or is there some Apache setting regarding running the PHP code? I did check, and the code in test.php runs fine when I path to it directly.
Thanks for your help!
Example:
#!/usr/local/bin/php
Note:
You need to check actual path to the correct PHP executable and use that path.
For more info, please read Apache documents.
AddHandler server-parsed .html
AddType text/html .php
See Apache mod_mime [httpd.apache.org].
There's also the possibility that the server is misconfigured if it's Apache 1.x, with the LoadModule list order being incorrect. We'll discuss that if the above doesn't help.
Jim