Forum Moderators: phranque
the base folder for the website is cyprax and there is a subfolder dynam.
I added the following to the .htaccess file in the cyprax folder:
addhandler dynam .html
addhandler dynam .htm
action dynam /dynam/apply_html_template.php
I thought this would execute the apply_html_template.php script in the dynam folder.
Doing a get for index.html from a browser results in a 404 message for the file
/dynam/apply_html_template.php/cyprax/index.html
How can I suppress the appending of /cyprax/index.html onto the script name?
Thanks.
Action dynam /dynam/apply_html_template.php?request_uri=
Another method is to simply parse html files for PHP code, or to use mod_rewrite to rewrite htm/hrml requests to the PHP file(s).
AddHandler Server-parsed .html .htm
RewriteEngine on
RewriteRule ^([^.]+)\.html?$ /apply_html_template.php [L]