Is there a reason you don't just use a Redirect?

  <VirtualHost  __default__:80>
  Redirect              /       https://secure.server.com/
  </VirtualHost>

Regards,
Christian

-----------------
Christian Gilmore
Technology Leader
GeT WW Global Applications Development
IBM Software Group


> -----Original Message-----
> From: Aaron J Mackey [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 13, 2002 1:12 PM
> To: [EMAIL PROTECTED]
> Subject: automatic redirect to https
> 
> 
> 
> Can anyone see something wrong with this, or suggest a better 
> mechanism:
> 
>     unless ( $ENV{HTTPS} ) {
>         # bounce request to secure port
>         my $uri = $r->parsed_uri();
>         $uri->scheme('https');
>         $r->header_out(Location => $uri->unparse());
>         return REDIRECT;
>     }
> 
> This doesn't seem to work for me; the browser acts as if it's in an
> eternal redirection loop.  And the server's error log says 
> that a child
> segfaulted in the process.  The $uri->unparse yields a string like
> "https:/mydirectory" when I access 
> "http://myserver.org/mydirectory";.  Do
> I need to rebuild the entire URI manually?
> 
> Thanks,
> 
> -Aaron
> 

Reply via email to