Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Nov 2001 10:35:56 -0500
From:      "Robert Myers" <ccrider@whiterose.net>
To:        "'Drew Tomlinson'" <drew@mykitchentable.net>, <questions@freebsd.org>
Subject:   RE: Apache mod_rewrite Help
Message-ID:  <002401c1686b$0fb257a0$0501a8c0@ccridernote>
In-Reply-To: <011001c1664c$2111b200$0301a8c0@bigdaddy>

next in thread | previous in thread | raw e-mail | index | archive | help
I think you are missing the ReWriteCond, which is used in conjunction with
the ReWriteRule.

I had some trouble with this as well, and what I did was increase the
Rewriteloglevel to 9,
placed that directive, and the Engine On directive in my httpd.conf, then
used a .htaccess file to do the rest.
This way I could easily change the .htaccess file before moving it into my
config.

Also, I would assume you've checked the rewrite examples at apache.org

HTH

Robert Myers
ccrider@whiterose.net
MCSE,CCA,CCNA
Systems administrator for White Rose Inernet Service
http://whiterose.net


-----Original Message-----
From: owner-freebsd-questions@FreeBSD.ORG
[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Drew Tomlinson
Sent: Monday, November 05, 2001 5:50 PM
To: questions@freebsd.org
Subject: Apache mod_rewrite 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


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?002401c1686b$0fb257a0$0501a8c0>