1

I am trying to run a PHP script on an html page and I have figured out that I need to add the following to my htaccess file:

AddHandler application/x-httpd-php .html

So I did that and it allowed the PHP script to run as needed, but it also blocked another AddHandler from running, which I use for html include files such as sitewide navigation and ads.

This is what my htaccess file looks like:

Options +Includes
AddHandler server-parsed .html

AddHandler application/x-httpd-php .html

For whatever reason the Options +Includes AddHandler gets blocked when I add the PHP AddHandler, which means the sitewide include files do not display as they usually do.

Is there a way to have both AddHandler commands running without one blocking the other?

Thanks for any help...

  • have you tried this for php5 AddType application/x-httpd-php5 .html .htm – Nuriddin Rashidov Oct 24 '15 at 18:42
  • I actually have tried AddType, but on my particular web host, which is Bluehost, it triggers a download popup when you try to access the web page. AddHandler is the only way I have been able to get the PHP script to work properly so far. – ChicagoGuy72 Oct 24 '15 at 18:51

0 Answers0