0

I've been trying to get .HTML files to process like .PHP files using the .htaccess file on my localhost. I've used the following one by one,

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

AddHandler application/x-mapp-php55 .php .html

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

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

But none of the above worked for me.

I am using php5.5 and apach 2.4 in xampp

Is there any other configs in apache config file?

Need help

This question is clear, but no proper answers yet given. It seems nobody can answer it. Too bad, but it can happen

Shri
  • 703
  • 3
  • 11
  • 28

2 Answers2

1

This has worked for me in the past.

AddHandler application/x-httpd-php .html

Also note that you must have mod_mime activated in Apache.

Also I assume your server is allowing the use of an .htaccess file and the AddHandler directive with either :-

AllowOverride All

or

AllowOverride FileInfo
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
0

My DEV HTACCESS looks like this

<IfModule mime_module>
  #AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
  AddType application/x-httpd-php .php .htm .html .shtml
</IfModule>

I switch the Hashing for LIVE server though. Hope this helps

Tyler2P
  • 2,324
  • 26
  • 22
  • 31
Calamaster
  • 35
  • 6