Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 61900 invoked from network); 16 Dec 2003 21:09:41 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Dec 2003 21:09:41 -0000 Received: (qmail 60039 invoked by uid 500); 16 Dec 2003 21:09:17 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 59963 invoked by uid 500); 16 Dec 2003 21:09:16 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 59949 invoked from network); 16 Dec 2003 21:09:16 -0000 Received: from unknown (HELO bpd2mo1no.prod.shawcable.com) (64.59.128.220) by daedalus.apache.org with SMTP; 16 Dec 2003 21:09:16 -0000 Received: from bpd2mi2no.prod.shawcable.com (bpd2mi2no-qfe3.prod.shawcable.com [10.0.184.121]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0HQ000HFZARMN3@l-daemon> for users@httpd.apache.org; Tue, 16 Dec 2003 14:09:22 -0700 (MST) Received: from shawcable.com (h24-77-20-143.wp.shawcable.net [24.77.20.143]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0HQ00081ZARL2P@l-daemon> for users@httpd.apache.org; Tue, 16 Dec 2003 14:09:22 -0700 (MST) Date: Tue, 16 Dec 2003 15:10:01 -0600 From: Selmer Ausland To: "users@httpd.apache.org" Message-id: <3FDF74A9.476361A2@shawcable.com> MIME-version: 1.0 X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: [users@httpd] Mod rewrite problems X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello Group; I am running Apache 2.0.48, with Windows NT 4.0 on a webhosting server. I want to prevent hot-linking to my graphics etc. and ban, or redirect, spam-bots from my server. I inserted the following code (below)to prevent hotlinking, to my images etc., and to ban spambots, first, into the main body of my http conf and when that did not work, I tried it in my root VirtualHost. It works fine there. The problem now is, it now cuts of access to the images and also prevents viewing the webpages. When I access my webpages, the webpage shows up but not the graphics. When I add the code to ban the spambots then I cannot view the webpages, and receive a forbidden message. The rewrite section also gives me the following error quote: "Redirection limit for this url exceeded. Unable to load the requested page!" This is the code I am using: (All name-based VirtualHosts) ServerAdmin webmaster@mydomain.com DocumentRoot "D:/Apache2/htdocs" ServerName www.mydomain.com ServerAlias mydomain.com Options Indexes AllowOverride AuthConfig Options FileInfo Order Allow,Deny Allow from all RewriteEngine on RewriteLog logs/modrewrite.log RewriteLogLevel 1 RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com/.*$ [NC] RewriteRule.*\.(gif|GIF|jpg|mid|wav|mp3|avi|mpeg|)$ - [F] RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR,NC] RewriteCond %{HTTP_USER_AGENT} ^Bot\mailto:craftbot@yahoo.com [OR,NC] RewriteRule .*\. http://www.mydomain.com/errors/404.html [R] Could some kind soul please advise me as to how I can enable the above, and still be able to view my graphics and webpages. I have studied the Documentation on Apache and Googled until I am ga-ga and still can't seem to find the right combination. Most of the documentation seems pointed towards .htaccess files. I would prefer to have to it in my main http conf if possible. Any help would be appreciated. Thanks. Selmer Ausland --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org