I've been trying to get .HTML files to process like .PHP files using the .htaccess file, I've used the following, both of which don't work and trying to access the test page gives me an option to download a file that doesn't exist, any ideas?
Tried both of these;
AddType application/x-httpd-php .html .htm
AddType application/x-httpd-php5 .html .htm
The Idea is to allow includes in my web pages but still using .HTML files.
Below is some more code from my .htaccess file, I don't think its messing with the addType but I'll post it up.
## hide .html extension
# To externally redirect /dir/foo.html to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1 [R,L,NC]
## To internally redirect /dir/foo to /dir/foo.html
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [L]
1and1 have decided to only allow me to do it with the following code;
AddHandler x-mapp-php5 .html .htm
You need to add
Try this:
or
or
or
Edit: For 1&1 server:
One of these should work
You can try the code below also.
OR