Reputation: 4025
I added the following line to .htaccess
:
AddType application/x-httpd-php .html .htm
When I try to load any page on the side, my browser tries to DOWNLOAD the page! What am I doing wrong?
Thanks!
Upvotes: 5
Views: 2582
Reputation: 22947
HTML documents should be served to browser as text/html
. Change your MIME type.
AddType text/html .html .htm
If you're trying to execute HTML files as PHP, you should change the file extension to *.phtml.
If you're trying to force the PHP parser to work on these file types, you should be editing the httpd.conf
file on Apache to include the application/x-httpd-php
MIME type for those file extensions.
Upvotes: -1
Reputation: 943214
Most likely; you don't have the PHP module loaded for your webserver. This means that then the server finds a application/x-httpd-php file, it passes it directly to the client instead of running it through a PHP interpretor (which would run any PHP code and output a text/html content type). Since browsers don't include PHP interpretors, they treat it as any other unknown content type, and offer to save it to disc.
Upvotes: 5