I am trying to redirect user from https to http if user request nonsecure page from https. I got solution for same here, see solution provided by @user2432030 or @Johnboy

If secure URL has GET parameter like


then _getCurrentUnsecureUrl returns URL


means nonsecure URL looses all GET parameter which break results.

How to fix _getCurrentUnsecureUrl function so it will return correct http URL?

PS. If anyone have better solution for my real problem ie. redirecting user from https to http if page is nonsecure.


If you want to redirect the whole https-site to http you can do something like that in htaccess:

RewriteEngine On (should already be in your htaccess)
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
| improve this answer | |
  • if you "think" and dont "know" whats your problem how should we? :D pls describe it more in detail what you want – Stefan Gregori May 7 '14 at 9:40
  • have you gone through stack overflow link I posted in question? – Sandesh May 7 '14 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.