Forum Moderators: phranque
NOT able to use CIDR for IP's in mod_rewrite
It's more difficult in mod_alias.
RewriteCond %{REMOTE_HOST} ^200\.
RewriteCond %{REMOTE_HOST} !^200\.50\.
RewriteCond %{REQUEST_URI} !^/error\.php
RewriteRule .* - [F] The IP addresses can be specified using standard RegEx notation, e.g. 200\.50\.(3[2-9]|4[0-7])\. matches 20.50.32.nn to 47.nn and the trailing escaped period is very important.
if your boilerplate uses any includes, make sure those include files are also exempted
Yes I do use a custom 403
That only applies if you are including the files "over the web" with protocol and hostname in the reference.
For example, a page which is included using an SSI (Server Side Include) is a subrequest, and you may want to avoid rewrites happening on those subrequests. Also, when mod_dir tries to find out information about possible directory default files (such as index.html files), this is an internal subrequest, and you often want to avoid rewrites on such subrequests. On subrequests, it is not always useful, and can even cause errors, if the complete set of rules are applied. Use this flag to exclude problematic rules.
RewriteCond %{REQUEST_URI} !(translator|questions|index|silentfooter)\.html
RewriteRule ^silence/\w+\.html - [G] [Fri Dec 21 19:29:24 2012] [error] [client {my-IP-here}] unable to include "/silence/silentfooter.html" in parsed file /home/{username}/example.com/silence/translator.html Yes I do use a custom 403
In a custom location, not the "default custom" that any halfway decent host offers?
I would have hoped that you'd recall it because we've similar elcheapo hosts.