문제
SSL 링크를 사용하도록 Magento를 구성했습니다.
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 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/
?>
프로토콜에 차이가있는 이유는 무엇입니까?
// 롤랜드
해결책
~ 안에 app/code/core/Mage/Customer/etc/config.xml
항목이 있습니다 frontend/secure_url
~을 위한 /customer
.
이것은 도움이 될 것입니다
다른 팁
사용자 정의 모듈에서 HTTPS에 문제가있었습니다. 내 작업은 다음과 같습니다.
$loadFromSSL = $_SERVER['SERVER_PORT']==443?true:false;
Mage::getUrl('', array('_secure'=>$loadFromSSL))
나는 이것이 더 낫다고 생각한다 (: http://thecompleteprogramer.wordpress.com/2012/09/11/magento-get-url-with without-secure-path-according-to-current-protocol/)
Mage::getUrl('yourpath', array('_secure' => Mage::app()->getFrontController()->getRequest()->isSecure()));
이것은 나에게 효과가있었습니다
echo Mage::getUrl('customer/account/loginPost',array('_secure'=>true));
예를 들어:
당신이 탐색하는 경우 http 그 다음에
echo Mage::getUrl('customer/account/loginPost',array('_secure'=>true));
// http://dominio.com/customer/account/loginPost
당신이 탐색하는 경우 https 그 다음에
echo Mage::getUrl('customer/account/loginPost',array('_secure'=>true));
// https://dominio.com/customer/account/loginPost
제휴하지 않습니다 StackOverflow