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.
-
2Am I correct in assuming that
_securewill only use a secure URL if the corresponding controller's module is configured as such? (seeapp/code/core/Mage/Customer/etc/config.xml - frontend>secure_url node)pspahn– pspahn2013年09月20日 00:28:12 +00:00Commented Sep 20, 2013 at 0:28