I have enable SSL and one of CMS is restricted for register users.

And this page is in footer.

If logged in user try to access without https it fails and redirect to my account.

I want that particular CMS page url alway secure ie https://

<?php echo $this->getUrl('page_url_key',array('_secure'=>true));?> is not working.

How I will get CMS page url alway secure?


2 Answers 2


You have to use _type => 'direct_link'

Mage::getUrl('page_url_key', array( '_nosid' => true, '_store' => 'default', '_type' => 'direct_link' ));


You can use the _forced_secure option for this:

Mage::getUrl('page_url_key', array('_forced_secure' => true));

See http://www.magentocommerce.com/wiki/5_-_modules_and_development/reference/geturl_function_parameters for all options that you can use with getUrl.

  • 2
    Am I correct in assuming that _secure will only use a secure URL if the corresponding controller's module is configured as such? (see app/code/core/Mage/Customer/etc/config.xml - frontend>secure_url node)
    – pspahn
    Commented Sep 20, 2013 at 0:28

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.