markyoung1984 Posted June 26, 2008 Share Posted June 26, 2008 My ISP has told me that to modify settings in their php.ini file I can create my own php.ini file and insert it into my web directory. However, I want this file to be hidden from browsers for security reasons. Currently when typing www.mydomain.co.uk/php.ini the PHP file contents are displayed in my browser. I know this happens because the browser doesn't know what a ini file is and so displays it as plain text but I don't want it to be displayed. How can I stop it being displayed? Quote Link to comment Share on other sites More sharing options...
trq Posted June 26, 2008 Share Posted June 26, 2008 Place the following in your .htaccess file... <Files ~ ".ini$"> Order allow,deny Deny from all Satisfy All </Files> Quote Link to comment 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.