you need to set this header in apache so Routes will know that the
original
request was https:
RequestHeader set X_URL_SCHEME https
Use this only in the ssl virtual host so your site will be accessible
either with http or https.
On Jan 4, 4:53 am, Andre Kolell <[email protected]> wrote:
> Nn my Blog I habe written a complete example for using SSL (in
> German):http://blog.andrekolell.de/2008/12/27/ssl-zugriff-auf-pylons-auf-past...
>
> ----- Ursprüngliche Mail -----
> Von: "Mike Orr" <[email protected]>
> An: [email protected]
> Gesendet: Dienstag, 23. Dezember 2008 10:32:27 GMT +01:00
> Amsterdam/Berlin/Bern/Rom/Stockholm/Wien
> Betreff: Re: Problem with redirect_to and SSL
>
> On Mon, Dec 22, 2008 at 2:36 AM, Andre Kolell
>
> <[email protected]> wrote:
>
> > I solved the problem regarding redirect_to and SSL by using mod_rewrite to
> > redirect each http-request to https:
>
> > NameVirtualHost *:80
>
> > <virtualhost *:80>
> > RewriteEngine On
> > RewriteCond %{HTTPS} !=on
> > RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R]
> > </virtualhost>
>
> > I'm not sure if this is an adequate solution.
>
> I use a variation of this and have not had any problems with redirect_to:
>
> <VirtualHost IP:80>
> ServerName DOMAIN
>
> RewriteEngine On
> RewriteRule /(.*) https://DOMAIN/$1 [R=permanent]
>
> CustomLog /dev/null combined
> </VirtualHost>
>
> My main purpose for this is not redirect_to but in case the user tries
> to go to the site with http:. But I guess it also solves a problem I
> didn't know I had.
>
> The 'RewriteCond %{HTTPS} !=on' is not necessary since you've
> specified :80 and port 80 is always HTTP.
>
> --
> Mike Orr <[email protected]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---