As far as I know the function checks whether HTTPS is activated over the backend. Why would you pass the function to go without it then?



Returns http://localhost/checkout/cart/ whilst

 $this->getUrl('checkout/cart', array("_secure"=>true));

returns https://localhost/checkout/cart/, but only when its active in the backend. You could call app() and check for the value as well, but its just burning calculating time on the server as the function will only return https when it is enabled anyhow.


Can't answer the "why" ... but maybe it's still useful:

If you use http for your unsecure base URL and want to force using secure url on particular pages you can also do this in you config.xml

  • 1
    I belive that this "sometimes https, sometimes http" is a relict from earlier times of securing websites where you especially only secured specific pages. SSL has nowadays another standing.
    – Max
    Jul 16 '17 at 13:37
  • 1
    Yep. This is why i can't answer the "why" question ... all sites i'm involved use SSL everywhere.
    – sv3n
    Jul 16 '17 at 13:41

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.