Forum Moderators: coopster
suPHP_AddHandler x-httpd-php .htm
suPHP_Engine on
suPHP_UserGroup user group
suPHP_AddHandler x-httpd-php5 .php5
suPHP_AddHandler x-httpd-php .php
I would test any such config changes within a subdirectory or test site to avoid any live errors.
Incidentally, the FAQ has the following which may be of use:
I have installed and configured suPHP, but PHP scripts are still not executed. Instead of returning the script output, the source code itself is returned.
Please make sure you have not only setup the fileextensions using the AddType directive but also have registered the MIME type with mod_suphp using the suPHP_AddHandler directive.[suphp.org...]
I think you need to know which user and group are allowed to run the files (after suPHP_UserGroup), and modify as appropriate:
suPHP_Engine on
suPHP_UserGroup USER GROUP
AddHandler x-httpd-php .htm
suPHP_AddHandler x-httpd-php
Really though, your host should be able to tell you the correct code!
why do not you ask your host to edit the httpd to allow for htm
it will take them roughly one min, further it could help may other clients of that ISP, it does not change any user setup, just an improvement!
offer to pay for it, it won't cost you an arm and a leg.
To connect the two, add a rule for a rewrite (NOT a redirect) to .htaccess. The result is you have .php files on the server and your users continue to see the same .html URLs as before.
The final part of the fix involves setting up a 301 redirect from .php URLs over to .html URLs, so that the .php files cannot ever be directly indexed as .php URLs.
The Apache forum here at WebmasterWorld can likely help you with example code in various threads and a bit of help to get it working.
Receptional Andy: Quotes the FAQ:
...Please make sure you have not only setup the fileextensions using the AddType directive but also have registered the MIME type with mod_suphp using the suPHP_AddHandler directive....
helenp:
I have thried this:
suPHP_Engine on
suPHP_UserGroup user group
suPHP_AddHandler x-httpd-php5 .php5
suPHP_AddHandler x-httpd-php .htm
and this:
suPHP_Engine on
suPHP_UserGroup user group
suPHP_AddHandler x-httpd-php .htm
I may be missing something, but shouldn't there be an AddType directive here as well, as implied by the FAQ? (Which your host later seemed to add to your .htaccess)? Just wondering.