I need to run all of my .html files as .php files and I don\'t have time to change all of the links before our presentation tomorrow. Is there any way to \"hack\" this with
You may also use the H or T flag of mod_rewrite to force all .html files to be parsed by php handler :
using H (Handler) flag:
RewriteEngine on
RewriteRule \.(html|htm)$ - [H=application/x-httpd-php5]
using T (Type) flag :
RewriteEngine on
RewriteRule \.(html|htm)$ - [T=application/x-httpd-php5]
Or you can add more extensions to the rule pattern seprated by a pipe | that you want to be parsed by php handler
ex :
RewriteRule \.(html|htm|txt|foo)$ - [T=application/x-httpd-php5]
the example above will change the mime type of files that end with .html , .htm , .txt , .foo to php.
Note : on some servers you will have to change php5 to php to get this example to work in handler string:
Change it
[T=application/x-httpd-php5]
to
[T=application/x-httpd-php]