You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by zBit <z0...@gmail.com> on 2015/02/26 17:25:08 UTC
[users@httpd] mod_rewrite does not respect env HTTPS
Hello everyone!
I have Apache SSL virtuals behind the Nginx proxy defined with this directive:
SetEnvIf X-Forwarded-Proto https HTTPS=on
Users often use the following rewrite rule in their htaccess files for
detecting SSL connection, but the variable HTTPS is not treated as
expected:
RewriteCond %{HTTPS} =on
Is there any workaround for this? So far, I tried to disable mod_ssl
completely and also checked modules hooks and it seems that
environment files are loaded before the rewrite module.
BR, David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_rewrite does not respect env HTTPS
Posted by Eric Covener <co...@gmail.com>.
On Thu, Feb 26, 2015 at 11:25 AM, zBit <z0...@gmail.com> wrote:
> RewriteCond %{HTTPS} =on
>
> Is there any workaround for this? So far, I tried to disable mod_ssl
> completely and also checked modules hooks and it seems that
> environment files are loaded before the rewrite module.
%{HTTPS} does not look up an environment variable. It calls a function
that asks the mod_ssl if if the connection is using SSL.
If it's not used for security, and your users know what it means, you
could have them use %{ENV:HTTPS}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org