默认情况下这是怎么Magento的行为方式。
尝试创建一个links.phtml文件用下面的代码
if(Mage::app()->getStore()->isCurrentlySecure()){
$url = Mage::getUrl('about-us', array('_secure'=>true));
//$url = Mage::getUrl('',array('_secure'=>true) . 'about-us'; // if above code doesn't work try this
}
else{
$url = Mage::getUrl('about-us');
}
echo '<a title="Click here for more information" href="'. $url .'" target="_self">About Us</a>';
然后在静态块
{{block type="core/template" template="path/to/file/links.phtml"}}
使用Apache重写将重定向页面,HTTPS,但观看时的根据链接源将仍然是没有HTTPS
如果您缓存上启用服务器双重检查,以确保它不缓存一个版本....如果缓存,那么你就需要更改块类型(核心/模板),以一个不缓存)
在类似的问题: http://stackoverflow.com/questions/584251/short-way-to-link-to- HTTP的从-HTTPS的和使用-反之亦然-相对链接 – PiLHA