My apologies for a noob question, but I've put a lot of time and googling into this yet I still haven't solved it. So help please!
I have a index.html file which is auto-generated by my tools (hence I don't want to manually rename it, because then I'd have to manually rename it every single time...) which contains PHP code. So I need to push it through the PHP parser. But only that one file.
In Apache in the .htaccess file I can do this:
<Files frankandcolleen/index.html>
RemoveHandler .html
AddType application/x-httpd-php .html
</Files>
This does not work on litespeed; my webhost tells me their litespeed doesn't support the Files directive.
I thought perhaps a rewrite might do the trick. Just to rename the file. Maybe something like this:
RewriteEngine on
RewriteRule frankandcolleen/index.html frankandcolleen/index.php [L]
This doesn't work either. Probably for a whole bunch of reasons...
Right now as an interim measure I'm doing this:
RemoveHandler .html
AddType application/x-httpd-php .html
This works, but it forces every single html file through the PHP parser, which is both slow, and CPU intensive on the server.
How do I push that html file, and only that file, through the PHP parser? Or rename that html file into a php file?
Thanks!!!
I have a index.html file which is auto-generated by my tools (hence I don't want to manually rename it, because then I'd have to manually rename it every single time...) which contains PHP code. So I need to push it through the PHP parser. But only that one file.
In Apache in the .htaccess file I can do this:
<Files frankandcolleen/index.html>
RemoveHandler .html
AddType application/x-httpd-php .html
</Files>
This does not work on litespeed; my webhost tells me their litespeed doesn't support the Files directive.
I thought perhaps a rewrite might do the trick. Just to rename the file. Maybe something like this:
RewriteEngine on
RewriteRule frankandcolleen/index.html frankandcolleen/index.php [L]
This doesn't work either. Probably for a whole bunch of reasons...
Right now as an interim measure I'm doing this:
RemoveHandler .html
AddType application/x-httpd-php .html
This works, but it forces every single html file through the PHP parser, which is both slow, and CPU intensive on the server.
How do I push that html file, and only that file, through the PHP parser? Or rename that html file into a php file?
Thanks!!!