Hi there I want to apply a ReWrite rule to all visitors to a particular website EXCEPT certain ranges. E.g. the googlebot range. How do I specify a mask of /20 ? Or how do I specify the entire range of 66.249.64.0/20 ? Any assistance will be much appreciated. Regards Mudder
Perhaps if I show you the entry in my httpd.conf ? This example does not work. The IP checks are ignored... Perhaps someone cna spot why it doesn't work. The rewrite works fine. Its just the IP checking part that is ignored. <Directory "/opt/htdocs/stuff"> Options +FollowSymLinks -Indexes AllowOverride All RewriteEngine on ### DO NOT DELETE RewriteCond %{REMOTE_ADDR} !^192\.168\.193\.[1-255]$ RewriteCond %{REMOTE_ADDR} !^66\.249\.[64-79]\.[1-255]$ RewriteRule ^images/corp/([^/]+)/([^/]+).pdf$ http://www.mydomain.co.za/docs/$1/$2.xml [L] ### End Force Order allow,deny Allow from all </Directory>
just a word of warning. seems like you want to cloak content here. i have previously been busted for this by G and nullified all my hard work. they are pretty smart about their bots and the ips they use. there is no complete list of bots. i realize i wasn't answering your question but just thought i'd throw this in there.
I found this via a G search. The RewriteCond syntax below fails in Apache 2.0. I wonder if there is a change in the engine for Apache 2.2 ? I've been concerned with blocking a larger part of a network, EXCEPT 2 /24 portions, and I tried using the rules below and apache-2.0.x complains about the regex portion.