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.
----- Ursprüngliche Mail -----
Von: "Andre Kolell" <[email protected]>
An: [email protected]
Gesendet: Freitag, 19. Dezember 2008 16:51:57 GMT +01:00
Amsterdam/Berlin/Bern/Rom/Stockholm/Wien
Betreff: Problem with redirect_to and SSL
Hello,
I'm using Apache with SSL and use it's Proxy functionality to forward requests
to the local running Paster (with Pylons 0.9.7rc2). SSL and Links work fine
(with Mako). Only when Pylons comes to use the redirect_to-function it always
ends up in http- instead of https-Connections. Using protocol='https' as a
redirect_to-Parameter only solves my problem at first view, but as I'm
developing local without SSL, it's not really a solution.
I also seems as if request.environ['wsgi.url_scheme'] gives me "http" instead
of "https". May be redirect_to uses request.environ['wsgi.url_scheme']?
Does anyone know why redirect_to doesn't use SSL-Connections and how I can make
redirect_to using them?
Best regards,
Andre
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---