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
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 <slugg...@gmail.com>