Why is that?
Among other, I have these lines in PHP.INI:
include_path = ".:/path/public_html"
auto_prepend_file = "/path/public_html/track/script.php"
The script writes some referrer data into a cookie. It works fine as long as I have these or similar (depending on the server) directives in .htaccess:
AddHandler application/x-httpd-php .html
AddType x-mapp-php .html
If the script is pure PHP as it is, why such AddHandler directives seem to be mandatory?
Little background:
To be honest, I don't mind using such unless they affect how my website works. In this particular case, those directives cause IE9 to download instead of render the page. Firefox works fine. If I change them to this (note that 5 for PHP):
AddHandler application/x-httpd-php5 .html
AddType x-mapp-php5 .html
IE9 works fine, but then those directives cause the server to return duplicated content on requests with trailing slash. Example: somepage.html/something returns somepage.html with broken links which create new duplicate pages and so on. With one website, after I stopped this, Google is asking for 13K pages while the website has around 300.
The initial question is based on a trouble with CGI based server. On others where PHP is configured to run as Apache, I can use AddHandler and directive AcceptPathInfo Off which turns those slashes OFF and returns 404 as it should be.
Background ends.
So yeah, why that AddHandler is needed for PHP scripts that are set to run with auto_prepend_file in PHP.INI? Later on, PHP seem to work fine (I know this based on the exit PHP scripts/redirects).
Thanks