Results 1 to 2 of 2
  1. #1

    mod_rewrite question

    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 [email protected]"

    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?

  2. #2
    Join Date
    Jan 2002
    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.
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts