2

How can I get secure store url with store code in CMS page or block?

e.g. https://www.mydomain.com/storecode/ should be generated..

3
  • do you have store codes in url enabled on your magento instance?
    – Marius
    Commented Dec 5, 2014 at 12:49
  • Are you talking about Admin setting? If so, how do I check that?
    – user17126
    Commented Dec 5, 2014 at 12:53
  • yes I'm talking about the admin setting. Check by looking int he admin: System->Configuration->web
    – Marius
    Commented Dec 5, 2014 at 12:54

2 Answers 2

5

Try this:

<a href="{{store direct_url="" _secure=1}}">Some text</a>

if that does not work try

<a href="{{store direct_url="" _force_secure=1}}">Some text</a>
2
  • @user17126. Welcome to SE. when an answer solves your problem mark it as accepted. This way future readers with the same problem find the answer faster.
    – Marius
    Commented Dec 5, 2014 at 13:04
  • 1
    I think it's _forced_secure=1, app/code/core/Mage/Core/Model/Url.php line 135
    – LDusan
    Commented Sep 2, 2015 at 12:12
0

For the unsecured base URL:

{{config path='web/unsecure/base_url'}}

Or for the secured base URL:

{{config path='web/secure/base_url'}}

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.