gpt4 book ai didi

php - Magento SSL 链接

转载 作者:太空宇宙 更新时间:2023-11-03 12:55:55 25 4
gpt4 key购买 nike

我已将 magento 配置为使用 SSL 链接..

Base URL      https://sub.domain.com/Base Link URL {{secure_base_url}}Base ... URL  {{secure_base_url}}.../Use Secure URLs in Frontend: YESUse Secure URLs in Backend:  YES

Frontend i have some custom links built with Mage::getUrl([...])

<?php
// link to CMS page
echo Mage::getUrl('help'); //-> http://sub.domain.com/help/
// link to customer account
echo Mage::getUrl('customer/account'); //-> httpS://sub.domain.com/customer/account/
?>

为什么协议(protocol)不同?

//罗兰

最佳答案

我的自定义模块中的 https 有问题;我的工作是这样的:

$loadFromSSL = $_SERVER['SERVER_PORT']==443?true:false;

Mage::getUrl('', array('_secure'=>$loadFromSSL))

关于php - Magento SSL 链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1411531/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com