5

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?

asked Jul 6, 2013 at 7:04
0

2 Answers 2

5

You have to use _type => 'direct_link'

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

answered Jul 6, 2013 at 23:27
9

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.

answered Jul 7, 2013 at 8:13
1
  • 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) Commented Sep 20, 2013 at 0:28

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.