Parsing html as PHP

So you'd like Apache to handle .html and .htm type files as though they were php?  Here's a quick .htaccess edit that will force apache to process .html as php on the server.

 

AddHandler application/x-httpd-php5 .php .html .htm

 

Some servers will need a MIME type directive in the .htaccess instead of this, but this will work on our php5 servers.

  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

301 Redirect for All Domains

So you've purchased a ton of domains to park on your main account, but you don't want Google to...

301 Redirect from non-www to ww -- Without Looping!

So - you want to improve your search engine rankings, and SEO experts are telling you that Google...

Block a country using mod_geoip

Do you have a list of countries that you want to block access to your site?  Have you tried...

Hotlink protecting image.php and GD images

So you've enabled cpanel's hotlink protection, but those bandwidth theives are still attacking...

How do I redirect a page or folder?

I have removed a file from being on the website and would like to forward people who were looking...

Powered by WHMCompleteSolution