Home > Cpanel Basics > how to make php script work in html files using .htaccess

how to make php script work in html files using .htaccess

July 22nd, 2010

If you want HTML files parsed as PHP… You can write following in .htaccess file.

For web servers using PHP as apache module:

AddType application/x-httpd-php .html .htm

For web servers running PHP as CGI:

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

For web servers using PHP as suphp module:

AddType application/x-httpd-php5 .htm .html

Cpanel Basics

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.