Jump to content

.htaccess changes to use php script in .htm or .html files..HOW


Recommended Posts

Hi I'm writing this down after failing to find an .htaccess in the root (www) folder -i think ideleted it by mistake or it wasn't there anyways- but still there are three other .htaccess files , one under: wamp/apps/phpmyadmin***/setup/lib  anothet under: wamp/apps/phpmyadmin***/libraries and the last under: wamp/apps/phpmyadmin***/contrib

 

which one of these do I use to apply changes so i can use php scripts within .htm and .html files?!! :'(  thanks in advance

You can start with an empty file, there isn't likely to be any configurations within the existing files that you will want.

 

.htaccess files reside over the directory they are place in and all child directories unless they again contain another directory, so yes, if you need the rules to apply to www and below, that is indeed where it belongs.

thanks for the help...i made a new file , placed it in the root, and i can happily use php script within my htm files....for those interested about what to add to the .htaccess file to make this work, just add one of these linse or both:

 

AddType application/x-httpd-php .htm #allows use of php script within .htm file

AddType application/x-httpd-php .html #allows use of php script within .html file

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.