jmahdi Posted May 30, 2011 Share Posted May 30, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/237933-htaccess-changes-to-use-php-script-in-htm-or-html-fileshow/ Share on other sites More sharing options...
trq Posted May 31, 2011 Share Posted May 31, 2011 None, they all sound like they are part of phpmyadmin. Just create a new one. Quote Link to comment https://forums.phpfreaks.com/topic/237933-htaccess-changes-to-use-php-script-in-htm-or-html-fileshow/#findComment-1222794 Share on other sites More sharing options...
jmahdi Posted May 31, 2011 Author Share Posted May 31, 2011 thanks for the reply, do i just copy the contents of either of these files for the new one? and do i place the new file in the www directory? thanks Quote Link to comment https://forums.phpfreaks.com/topic/237933-htaccess-changes-to-use-php-script-in-htm-or-html-fileshow/#findComment-1222800 Share on other sites More sharing options...
trq Posted May 31, 2011 Share Posted May 31, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/237933-htaccess-changes-to-use-php-script-in-htm-or-html-fileshow/#findComment-1222806 Share on other sites More sharing options...
jmahdi Posted May 31, 2011 Author Share Posted May 31, 2011 thanks ...i'll try this Quote Link to comment https://forums.phpfreaks.com/topic/237933-htaccess-changes-to-use-php-script-in-htm-or-html-fileshow/#findComment-1222817 Share on other sites More sharing options...
jmahdi Posted May 31, 2011 Author Share Posted May 31, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/237933-htaccess-changes-to-use-php-script-in-htm-or-html-fileshow/#findComment-1222866 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.