Picnic Website Code Tutorials

.htaccess Run (Parse) HTML As PHP Tutorial

You can't use php in pages with html extensions unless you change the server configuration. If you have a brand new website (therefore no real SEO page rank) then just change all the html extensions to php extensions. On the other hand, if you have an established site and like your page rank, and don't want to break others links to you, then you can just put this simple code into your .htacces wich will allow you to run (parse) php within html pages. Now you can use php includes and etc.

# make server run html as php
AddHandler application/x-httpd-php5 .html .htm

Need help adding this or other code to your website? Post it here in the forum! Forum


Top Donators

Friends of Mine