Reputation: 23244
We have a custom php.ini and .htaccess file in the root of the web tree.
The .htaccess cannot be accessed by default but the php.ini can be accessed.
For example:
http://example.com/php.ini
Whats the recommenced procedure to block access to the php.ini file?
Upvotes: 3
Views: 3352
Reputation: 2434
Change the CHMOD or permissions so it is not executable by the user.
Upvotes: -2
Reputation: 7249
Also if you must have it in the public folder try:
<Files php.ini>
order allow,deny
deny from all
</Files>
Upvotes: 15