Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF9BC47F8 for ; Fri, 13 May 2011 16:03:11 +0000 (UTC) Received: (qmail 83889 invoked by uid 500); 13 May 2011 16:03:08 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 83823 invoked by uid 500); 13 May 2011 16:03:08 -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 83815 invoked by uid 99); 13 May 2011 16:03:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 May 2011 16:03:08 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.111.4.26] (HELO out2.smtp.messagingengine.com) (66.111.4.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 May 2011 16:03:02 +0000 Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 6FE5B21037; Fri, 13 May 2011 12:02:41 -0400 (EDT) Received: from frontend1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 13 May 2011 12:02:41 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=VTMjKF3YHeNA/+Q7EhjQHZubx0w=; b=P39hctmKrkmBQ4Myb06qlf6/RkCvAxvuxxKtOo6XfSVuApsikveY5xuQ2mi2zYO+jZ76k3AFlFwZUWpA/jTgD/aRW3tu9BDiOC2y8D75N1cIOo8AU2rPQD13JnH2xDWFiavdMBBtUpKbsVUyS3LYRVSkcw9x8BILrp++SAVYA9A= X-Sasl-enc: 2dQts9+uBG8akGreC2ObJUpAq+W4LnGXTb+XlpnoCZqH 1305302561 Received: from asura.catseye.org (unknown [198.111.179.55]) by mail.messagingengine.com (Postfix) with ESMTPSA id 3458B405AEA; Fri, 13 May 2011 12:02:41 -0400 (EDT) Message-ID: <4DCD561A.5060402@catseye.org> Date: Fri, 13 May 2011 12:02:34 -0400 From: Mark Montague User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.7) Gecko/20100801 Lanikai/3.1.1 MIME-Version: 1.0 To: users@httpd.apache.org, Carmel References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [users@httpd] Custom Message On May 13, 2011 11:08 , Carmel wrote: > I am using a "htaccess" file to limit certain IP from accessing my > server. This is the format of the file: > > > order allow,deny > deny from X.X.X.X > allow from all > > > This is working perfectly. Is there anyway I can have a custom message > displayed when a site listed in the above file is blocked? First, what you have above allows HTTP methods other than the three you list. If you want to block all access from the above IP addresses, you should get rid of the Limit stanza and just put the Order, Allow, and Deny directives directly in the .htaccess file. The ErrorDocument directive will allow you to control what the server returns to the client when access is denied: http://httpd.apache.org/docs/2.2/mod/core.html#errordocument You'll want to set up an ErrorDocument for the 403 status code. If you include the ErrorDocument directive in your .htaccess file, it will only apply to resources at and below that level. -- Mark Montague mark@catseye.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