B-219 Sec-55 Noida, India
+918010221733

Make PHP to work in your HTML files with .htacess

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
(Visited 63 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.