Forum Moderators: phranque

Message Too Old, No Replies

Need to understand

         

Tonygoth

3:45 pm on Nov 27, 2004 (gmt 0)

10+ Year Member



What the difference between
RewriteCond %{REMOTE_ADDR} ^#*$!\.xx\.xx\
and
order allow, deny
deny from #*$!.xx.xx.
allow from all

in the.htaccess script

jdMorgan

12:51 am on Nov 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Neither example is complete. However, there is no functional difference between these two:

RewriteCond %{REMOTE_ADDR} ^192\.0\.168\.
RewriteRule .* - [F]

<Files *>
Order allow, deny
Deny from 192.168.0.
Allow from all
</Files>

Both will deny access to any remote IP address starting with 192.168.0.

Depending on server setup, you may find that the second example (using mod_access) will create entries in your server error log when access is denied, while the first (using mod_rewrite) will not.

Jim