httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: Problem with mod_rewrite and SSL
Date Fri, 11 Oct 1996 11:23:32 GMT
Ralf S. Engelschall wrote:
> 
> On 10 Oct 1996 19:17:24 +0100 in en.lists.apache-new-httpd you wrote:
> 
> > I have discovered that external redirections don't seem to work quite
> > right with SSL and mod_rewrite.  For example, suppose I request
> 
> > https://server/foo/bar
> 
> > and in htaccess I have
> 
> > RewriteRule bar bar.html [R]
> 
> > Then the server redirects me to http://server:443/foo/bar.html
> > (on an ordinary server I get the correct redirection), instead of
> > https://server/foo/bar.html
> 
> > At a guess it is assuming http and 80 as the defaults.  I hope this
> > isn't too difficult to mend.  I can't see how I can do it without
> > specifying the method and port explicitly in the htaccess file
> > (something I'd like to avoid)
> 
> Yes, correct. I never tried SSL with Apache, so don't know how to check for
> SSL. What is the correct way to check under a SSL-aware Apache that the
> current URL which gets rewritten is a shttp: one? I think mod_alias.c 
> will have the same problem, hasn't it?

mod_alias doesn't suffer from the problem, because my patch patches it to fix
it (and a number of other places where the string "http:" is used). Basicly you
have to check whether you are on an SSLized port and emit the right string.
There are macros in the headers (of Apache-SSL) to do this for you.

Tedious, but thats the way it is at the moment.

Cheers,

Ben.

> 
> Greetings,
>                                         Ralf S. Engelschall    
>                                         rse@engelschall.com
>                                         http://www.engelschall.com/~rse

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.            Apache Group member (http://www.apache.org)

Mime
View raw message