...

View Full Version : .htaccess allow,deny for files



TripperTreats
03-28-2007, 05:17 AM
Hello, why is it that this works in my .htaccess file:

<Files .htaccess>
order deny,allow
deny from all
</Files>but none of these work (I've tried them all):

<Files .ini>
order deny,allow
deny from all
</Files>

<Files *.ini>
order deny,allow
deny from all
</Files>

<Files ~ "\.ini$">
order deny,allow
deny from all
</Files>

<Files php.ini>
order deny,allow
deny from all
</Files>

<Files "php.ini">
order deny,allow
deny from all
</Files>

_Aerospace_Eng_
03-28-2007, 08:10 AM
Hmm you are probably better off preventing hotlinking to the .ini file. I use this

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yoursite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://yoursite.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com$ [NC]
RewriteRule .*\.(ini)$ - [F,NC]



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum