httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wouter van Vliet" <wou...@springt.nl>
Subject RE: [users@httpd] %{HTTP:Authorization}
Date Wed, 12 Nov 2003 14:40:42 GMT

> 
> 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 <URL:http://httpd.apache.org/userslist.html> 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


Mime
View raw message