Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 55720 invoked from network); 12 Nov 2003 14:40:57 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Nov 2003 14:40:57 -0000 Received: (qmail 32101 invoked by uid 500); 12 Nov 2003 14:40:40 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 32086 invoked by uid 500); 12 Nov 2003 14:40:40 -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 32072 invoked from network); 12 Nov 2003 14:40:39 -0000 Received: from unknown (HELO smtp4.wanadoo.nl) (194.134.35.175) by daedalus.apache.org with SMTP; 12 Nov 2003 14:40:39 -0000 Received: from frodo (c3eea28e5.cable.wanadoo.nl [62.234.40.229]) by smtp4.wanadoo.nl (Postfix) with ESMTP id 001F9416CD; Wed, 12 Nov 2003 15:40:38 +0100 (CET) From: "Wouter van Vliet" To: , "'Robert Andersson'" Date: Wed, 12 Nov 2003 15:40:42 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 In-Reply-To: <083701c3a928$dd8fca40$652e50d5@profundis.se> Thread-Index: AcOpKOhwEqDKYqF7Tjyn6j3Fqx8QzwAAMuXA Message-Id: <20031112144039.001F9416CD@smtp4.wanadoo.nl> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: RE: [users@httpd] %{HTTP:Authorization} X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > > Michele Marcionelli wrote: > > What about a RewriteCond that looks for the status code 401? > > > > RewriteCond is_status_code_401 > > RewriteRule ... > > > > Is this possible? If "yes"... how? > > Sadly, there is no available variable for the status. Makes > sense, as the rewrite conds/rules runs before the status is > determined. > (..) > > You could of course implement this in any CGI (or semi-CGI) > language. You could also incorporate logic, that can > determine if a redirect is really wanted in the particular request. > > Regards, > Robert Andersson > Hmmm .. What if you don't set up an ErrorDocument, since it will never reach the client unless the client sends an invalid password three times. Though this triggered me think a certain way. When you're able to run your scripts in mod_perl environment you can define a custom 'Handler', which is usually a perl class. This handler might know about the status code from where you can redirect to the https environment. And if not, just fire a subrequest. Unfortunately I have no examples of this .. Wouter --------------------------------------------------------------------- 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