We'd like to redirect all HTTPS traffic to HTTP except for a specific URL which is /user/login
So far we've got:
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^user/login(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
But it's causing a redirect loop, when it redirects back to HTTP
Something like this should work:
But this doesn't make much sense for me. It would be better if you redirect only requests to /user/login via SSL and leave everything else as it is:
I believe this should do the trick:
The above will do the following:
You are looking for redirect when the URI does not match with /user/login/?? here is the answer.
https://stackoverflow.com/questions/7084048/apache-redirect-regexp-match-something-that-is-not-following-something/7084117#7084117