Web Hosting Talk







View Full Version : mod_rewrite question


jnestor
07-25-2002, 11:31 AM
I'm attempting to block certain user-agents using mod_rewrite and for the most part I'm having success. There's one however that seems to sneak through regardless of how I write the rules.

The user agent in the logs shows up as:
"larbin samualt9@bigfoot.com"

The rules include:

RewriteCond %{HTTP_USER_AGENT} larbin.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^prog
RewriteRule !robot.shtml /robot.shtml [R]

I've tried just "larbin" and "^larbin" and none of those work either. Any ideas?

Ahmad
07-26-2002, 02:37 AM
I can't really tell, but it could be some sort of a hidden character in the name. Try viewing your log with a hex editor.