Magento安装后无法访问
Magento安裝后無法訪問,提示“Illegal scheme supplied, only alphanumeric characters are permitted”,找到magento\app\code\core\Mage\Core\Model\Store.php,修改下面代碼
? ?/**
? ? * Check if request was secure
? ? *
? ? * @return boolean
? ? */
? ?public function isCurrentlySecure()
? ?{
? ? ? ?$standardRule = !empty($_SERVER['HTTPS']) && ('off' != $_SERVER['HTTPS']);
? ? ? ?$offloaderHeader = trim((string) Mage::getConfig()->getNode(self::XML_PATH_OFFLOADER_HEADER, 'default'));
? ? ? ?if ((!empty($offloaderHeader) && !empty($_SERVER[$offloaderHeader])) || $standardRule) {
? ? ? ? ? ?return true;
? ? ? ?}
? ? ? ?if (Mage::isInstalled()) {
? ? ? ? ? ?$secureBaseUrl = '';
? ? ? ? ? ?if (!$this->isAdmin()) {
? ? ? ? ? ? ? ?$secureBaseUrl = Mage::getStoreConfig(Mage_Core_Model_Url::XML_PATH_SECURE_URL);
? ? ? ? ? ?} else {
? ? ? ? ? ? ? ?$secureBaseUrl = (string) Mage::getConfig()
? ? ? ? ? ? ? ? ? ?->getNode(Mage_Core_Model_Url::XML_PATH_SECURE_URL, 'default');
? ? ? ? ? ?}
? ? ? ? ? ?if (!$secureBaseUrl) {
? ? ? ? ? ? ? ?return false;
? ? ? ? ? ?}
$url_this = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];//$secureBaseUrl updated by samzheng
? ? ? ? ? ?$uri = Zend_Uri::factory($url_this);//$secureBaseUrl updated by samzheng
? ? ? ? ? ?$port = $uri->getPort();
? ? ? ? ? ?$isSecure = ($uri->getScheme() == 'https')
? ? ? ? ? ? ? ?&& isset($_SERVER['SERVER_PORT'])
? ? ? ? ? ? ? ?&& ($port == $_SERVER['SERVER_PORT']);
? ? ? ? ? ?return $isSecure;
? ? ? ?} else {
? ? ? ? ? ?$isSecure = isset($_SERVER['SERVER_PORT']) && (443 == $_SERVER['SERVER_PORT']);
? ? ? ? ? ?return $isSecure;
? ? ? ?}
? ?}
轉載于:https://blog.51cto.com/excelsior/1272899
總結
以上是生活随笔為你收集整理的Magento安装后无法访问的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Liferay中使用portlet:re
- 下一篇: unicode字符、python乱码问题