codegreen
11-25-2010, 06:43 AM
Hi,
To prevent certain user agents from creating traffic (among other things) I want to setup htaccess to just prevent anything from being sent for the request (rather than sending to an error page)
Right now I have:
RewriteCond %{REQUEST_URI} !^/badagent.php
RewriteCond %{HTTP_USER_AGENT} (.*)BadUserAgent(.*)
RewriteRule .* http://www.domain.com/badagent.php [R=301,L]
What I'd like to do is the following:
RewriteCond %{HTTP_USER_AGENT} (.*)BadUserAgent(.*)
RewriteRule .* [STOP EXECUTION AND DO ABSOLUTELY NOTHING] [L]
How do I do this?
Thanks a ton in advance.
To prevent certain user agents from creating traffic (among other things) I want to setup htaccess to just prevent anything from being sent for the request (rather than sending to an error page)
Right now I have:
RewriteCond %{REQUEST_URI} !^/badagent.php
RewriteCond %{HTTP_USER_AGENT} (.*)BadUserAgent(.*)
RewriteRule .* http://www.domain.com/badagent.php [R=301,L]
What I'd like to do is the following:
RewriteCond %{HTTP_USER_AGENT} (.*)BadUserAgent(.*)
RewriteRule .* [STOP EXECUTION AND DO ABSOLUTELY NOTHING] [L]
How do I do this?
Thanks a ton in advance.