Forum Moderators: phranque
I create .htaccess and load it as ascii (chmod 644), and have never had problems getting it to work for other things.
My current .htaccess looks like this:
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName AllowLocalAccess
AuthType Basic<Limit GET>
order deny,allow
deny from 0.0.0.0
allow from all
</Limit>
I've also tried just using
<Limit GET>
order deny,allow
deny from 0.0.0.0
allow from all
</Limit>
order deny,allow
deny from 0.0.0.0
allow from all
None work. Am I leaving something out?
Now at the top of my .htaccess I have this :
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
Can anyone tell me please what the first line the one starting IndexIgnore actually does ?
IndexIgnore specifies a list of files to be "hidden" when displaying the index of a directory.
For more info, see the Apache Server mod_autoindex documentation [httpd.apache.org].
suenick,
For more information about allow/deny, see the Apache Server mod_access documentation [httpd.apache.org].
When in doubt, go to the source - it's free!
Hope this helps,
Jim
I have read those and just to make sure I understand 100%.
I want to ban X.IP.address
so should i put :
<Limit GET POST>
order deny,allow
deny X.IP.address
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
<Files .htaccess>
order deny,allow
deny from all
</Files>
OR should all of my 'deny, allow' be the other way round ?
I don't know - I use mod-rewrite to ban by IP, so I'm hesitant to give advice on a
method that I don't use. I encourage you to read the documentation, since it describes
the effects of the order directive precisely.
There are many good working examples of User-agent and IP-address ban lists here on
WebmasterWorld, so a site search [webmasterworld.com] might help, too.
Jim