1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

RewriteCond giving 500 error and not 403

Discussion in 'Apache' started by ian_ok, Feb 7, 2009.

  1. #1
    I've noticed in my logs that if I ban a useragent like below:

    RewriteCond %{HTTP_USER_AGENT} ^libwww-perl [OR]

    It returns a 500 error rather than a 403

    Should this cause me any alarm or do i need to change something. It works when I use this:

    deny from xxx.xxx.xxx.xxx

    I have this at the start of the section for banned ip's and user agents

    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

    My last line is this:

    RewriteCond %{HTTP_USER_AGENT} ^psycheclone
    RewriteRule ^.* - [F]

    Any tips or help on this would be appreciated.

    Thanks Ian
     
    ian_ok, Feb 7, 2009 IP
  2. darrenbeige

    darrenbeige Peon

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try the E flag. So new code is:

    RewriteCond %{HTTP_USER_AGENT} ^libwww-perl [OR, E=403]
     
    darrenbeige, Feb 8, 2009 IP