Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 64509 invoked from network); 5 Nov 2010 02:45:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Nov 2010 02:45:15 -0000 Received: (qmail 49617 invoked by uid 500); 5 Nov 2010 02:45:43 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 49495 invoked by uid 500); 5 Nov 2010 02:45:43 -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: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 49483 invoked by uid 99); 5 Nov 2010 02:45:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Nov 2010 02:45:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [213.203.219.181] (HELO mail4.conversis.de) (213.203.219.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Nov 2010 02:45:36 +0000 Received: from [192.168.2.101] (dslb-188-100-211-007.pools.arcor-ip.net [188.100.211.7]) by mail4.conversis.de (Postfix) with ESMTP id 4D89E2420006 for ; Fri, 5 Nov 2010 03:45:12 +0100 (CET) Message-ID: <4CD36FB8.4040107@conversis.de> Date: Fri, 05 Nov 2010 03:45:12 +0100 From: Dennis Jacobfeuerborn User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11) Gecko/20101019 Remi/fc11 Thunderbird/3.1.5 MIME-Version: 1.0 To: users@httpd.apache.org References: <4CD367B0.5030803@conversis.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [users@httpd] Forcing custom 404 error page instead of autoindex ErrorDocument 404 /_disabled/index.html RewriteEngine on RewriteRule !/_disabled/ /_force_404_ The idea was to use the rewrite rule to rewrite any access to a non-existing page and then have the ErrorDocument directive catch that but instead of a custom error page I only get the default message "The requested URL /_force_404_ was not found on this server." Regards, Dennis On 11/05/2010 03:31 AM, Igor Cicimov wrote: > Post the rewrite rule here. > > Igor > >> On Nov 5, 2010 1:11 PM, "Dennis Jacobfeuerborn" > > wrote: >> >> Hi, >> I'm trying to find a way to always generate a 404 error using htaccess >> when a directory is accessed and with mod_autoindex enabled. >> That is when I access http://server/directory/ I want to get a 404 error >> instead of an auto generated index. >> >> I tried doing this with a RewriteRule but the autogenerated index gets >> displayed anyway and disabling the Index with "Options -Indexes" only >> gives me a 403 instead of a 404. >> >> Is there a way to do this? >> >> Regards, >> Dennis >> >> --------------------------------------------------------------------- >> 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 >> >> --------------------------------------------------------------------- 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