Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2001 14:49:30 -0800
From:      "Drew Tomlinson" <drew@mykitchentable.net>
To:        <questions@freebsd.org>
Subject:   Apache mod_rewrite Help
Message-ID:  <011001c1664c$2111b200$0301a8c0@bigdaddy>

next in thread | raw e-mail | index | archive | help
I'm using Apache 1.3.19 on FBSD 4.4 and am trying to redirect any GET
requests that are a result of a IIS worm to an existing file on my
server.  I'm under the impression that the follow directives should
accomplish this:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteLog "/var/log/httpd-rewrite.log"
    RewriteLogLevel 2
    RewriteRule .*cmd.exe* /IIS_viri.ida
    RewriteRule .*root.exe* /IIS_viri.ida
    RewriteRule .*Admin.dll* /IIS_viri.ida
</IfModule>

where any URL contains either "cmd.exe", "root.exe", or "Admin.dll"
anywhere in the string, it will be redirected to IIS_viri.ida in my
ServerRoot.  Shouldn't this work?

To test this, I go to the URL http://www.mykitchentable.net/cmd.exe
but nothing gets redirected and the following error appears in my log:

192.168.1.3 - - [05/Nov/2001:14:38:54 -0800] "GET /cmd.exe HTTP/1.1"
404 338

So what am I doing wrong?  I am new so please don't assume I've done
all the obvious things (although I did restart Apache :) ).  Any help
would be appreciated.

Thanks,

Drew



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?011001c1664c$2111b200$0301a8c0>