Rewrite Rule to Leave SSL

Rewrite Rule to Leave SSL

Thursday 23 March 2006 10:50:49 pm - 2 replies

Author Message

Jonny Bergkvist

Friday 24 March 2006 1:10:35 am

Hi,

I have a working apache-ssl config that redirects back to http.

I use https for user-login (/user/*), and http for anything else.

The rewriterules in my normal apache-config are:
RewriteRule ^(.*)/user/(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L]
RewriteRule !\.(gif|css|jpg|png|jar|ico|js|pl)$ /ezroot/index.php

The rewriterules in my ssl-config are:
RewriteRule ^(.*)/user/(.*)$ /ezroot/index.php [L]
RewriteRule \.(gif|css|jpg|png|jar|ico|js)$ %{REQUEST_URI} [S=1]
RewriteRule ^(.*) http://%{HTTP_HOST}$1 [L]

Hope this helps :-)

Jonny

Rob Pratt

Monday 27 March 2006 11:01:02 am

Thanks for the example. I'll give it a try.

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.