1

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

https://example.com/catalogsearch/result/?ref=abd&q=demo

then _getCurrentUnsecureUrl returns URL

http://example.com/catalogsearch/result/

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.

1 Answer 1

1

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]
2
  • if you "think" and dont "know" whats your problem how should we? :D pls describe it more in detail what you want May 7, 2014 at 9:40
  • have you gone through stack overflow link I posted in question?
    – Sandesh
    May 7, 2014 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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