For example, I have one in:
\htdocs\
- Code: Select all
<Limit GET>
order allow,deny
allow from all
deny from 123.123.123.123
deny from anaughty.domain.com
</Limit>
<IfModule mod_rewrite.so>
...various re-write statements go here...
</IfModule>
...and one in \htdocs\phpBB\
- Code: Select all
DirectoryIndex index.html index.htm portal.php index.php
...and one in \htdocs\phpBB\admin\
- Code: Select all
[url]order deny,allow
allow from 666.666.666.666
deny from all[/url]
The first is to block certain sites from accessing any of my site. The second if to provide some index statements for my phpBB2 site. The third is to block anyone by a specified IP from accessing the admin part of my phpBB forum.
But my question is, do I need all of these and is it bad practice to have so many wandering around a site?
Also, is there a heirachy of .HTACCESS files. By this I mean, do all rules and lines mentioned in my \htdocs\.HTACCESS file apply to all sub-folders off of \htdocs\ or do the rules only apply to that directory?