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? Link to comment https://forums.phpfreaks.com/topic/112024-hiding-the-phpini-file/ 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> Link to comment https://forums.phpfreaks.com/topic/112024-hiding-the-phpini-file/#findComment-575012 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.