Forum Moderators: phranque
Now using those exact numbers and not getting dynamic or anything like the posts I keep seeing. I *just* want to be able to duplicate this multiple times (while understanding how to duplicate the code).
Now I've seen a post with this code...
RewriteCond %{REMOTE_ADDR} ^aaa\.bbb\.(23[2-9]�24[0-2])\. [OR]
RewriteCond %{REMOTE_ADDR} ^aaa\.bbb\.243\.([0-9]�[1-9][0-9]�1[0-4][0-9]�15[0-1])$
RewriteRule .* - [F]where aaa and bbb are the first respectively second '***' from your range. Be sure to replace the broken pipe characters � with the real ones from your keyboard.
... but thats over my head and I just need something simple please! Once I get the simple stuff covered I'll get in to the dynamic stuff! :-D
The Deny/Allow directives can deal with netmasks, which are infinitely superior than regular expressions' ability to deal with IP ranges. Additionally, you don't incur the processing overhead needed by mod_rewrite to execute Rules from a .htaccess file (details on this are in the mod_rewrite documentation [httpd.apache.org].
Of course, if you're simply wanting to learn how to write RewriteRules, that's fine. I'd suggest a different problem, however; The Right Tool For The Right Job(tm), and all that. =)