0

I have a directory and Protected with htaccess for IP Restriction.
IP restriction work good but just for Directory's Except .php files.

example :

site.com/dir/             <-- Get Access Denied Error
site.com/dir/index.php    <-- Open page without access denied error

My .htaccess files:

ErrorDocument 404 /notfound2.html
ErrorDocument 403 /notfound2.html
    AuthName "Access Restrict"
    AuthType Basic 
<Limit GET POST>
    order deny,allow
    deny from all
    allow from 47.147.50.5
</Limit>

I want to restrict a directory (with all objects includes php files too) to access from just a IP
Where's the problem ?

Root
  • 2,269
  • 5
  • 29
  • 58

1 Answers1

0

It seems you want to deny Directory Listing.

Try Option -Indexes or IndexIgnore *.tgz *.sql *.tar for specific files.

see http://wiki.apache.org/httpd/DirectoryListings for more info.

Rufinus
  • 29,200
  • 6
  • 68
  • 84
  • Thanks Rufinus , but I want to restrict a directory (with all objects includes php files too) to access from just a IP . – Root Nov 22 '12 at 16:14
  • this you have already handled by your limit block. (the auth lines are useless in this case) – Rufinus Nov 22 '12 at 16:49