php - Magento SSL 链接

标签 php ssl magento geturl

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

Base URL      https://sub.domain.com/
Base Link URL {{secure_base_url}}
Base ... URL  {{secure_base_url}}.../

Use Secure URLs in Frontend: YES
Use 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/

相关文章:

php - 在magento中覆盖1column.phtml文件

php - mysql 将 3 个表中的选择与一个不同的列结合起来

php - 谷歌应用内支付 : howto to handle Google's postback JWT

python - 无法连接mongodb,ssl错误,超时错误

java - 如何在 Tomcat 8 和 Java 8 中重新启用 SSLv3

magento - "NoMethodError: undefined method ` 特异性 ' for [:not(.block-layered-nav)]:Array"

javascript - Uncaught ReferenceError : jQuery is not defined in magento site

javascript - 在没有加载页面的情况下在 php 和 javascript 之间传递变量

php - MYSQL排序和限制使用某一行并选择上一行和下一行

go - 使用golang和tls,如何将rawCerts [][]byte(传递给VerifyPeerCertificate)转换为x509.Certificate?