Jump to content

Try to get a 404 error when accessing php.ini


marm

Recommended Posts

Hello, I'm trying to prevent malicious users from knowing that I am using a php.ini file in my site. I have placed these lines in .htaccess but when you fetch headers on that file, it returns a 302 error.

 

How can I send a 404 error instead of 302 ?

 

 

<Files ~ "\.(ini)$">

order allow,deny

deny from all

</Files>

Using a php.ini file in your website? I dont fully understand.

 

Can you not place the php.ini in a NON web accessible folder?

 

Here are the apache error codes:

http://wiki.kartbuilding.net/index.php/Apache#Apache_Error_Codes

 

403 means forbidden, which by your <Files> restriction code, seems correct.

 

-steve

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.