May
7
2009
7
2009
Make PHP to work in your HTML files with .htaccess
By default most web servers across the internet are configured to treat as PHP files only files that end with .php. In case you need to have your HTML files parsed as PHP (e.g .html) or even if you want to take it further and make your PHP files look like ASP, you can do the following:
For web servers using PHP as apache module:
AddType application/x-httpd-php .html .htm
For web servers running PHP as CGI:
AddHandler application/x-httpd-php .html .htm
In case you wish to do the ASP mimick:
For PHP as module:
AddType application/x-httpd-php .asp
OR for PHP as CGI:
AddHandler application/x-httpd-php .asp
Related Posts
Leave a comment
Categories
- Diary (10)
- IT (19)
- Programming (6)
- Life (6)
- LTT App Store (1)
- Mechatronics (6)
- Others (1)
EverBot.com
EverBot twitter
- Looking forward to seeing Ice Cream Sandwich on my old little Desire. Gonna be in-ter-rest-ting! 2 months ago
- I've learned that everything is uncertain. 4 months ago
- Every morning starts freshly and energetically when I think of YOU <3 4 months ago
- what makes you happy? 4 months ago
- I'm number 4 =) 5 months ago
An article by





