上午
我已阅读多篇有关此主题的主题,多次更改我的.htaccess和index.php但似乎无法使其正常工作。
这是我的index.php文件中的代码
/* ORIGINAL */
/* Store or website code */
/* $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; */
/* Run store or run website */
/* $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; */
/* Mage::run($mageRunCode, $mageRunType); */
/* ADJUSTED */
switch($_SERVER['HTTP_HOST']) {
/* 2nd Website */
case 'www.walkingdeadgraphicnovels.co.uk/shop/':
case 'www.walkingdeadgraphicnovels.co.uk/shop/':
Mage::run('www.walkingdeadgraphicnovels.co.uk/shop/', 'walking_dead_graphic_novels');
break;
/* main website */
default:
Mage::run();
break;
这是我的.htaccess代码
# A Place in Space
SetEnvIf Host *aplaceinspace.co.uk MAGE_RUN_CODE=base
SetEnvIf Host *aplaceinspace.co.uk MAGE_RUN_TYPE=website
# Walking Dead Graphic Novels
SetEnvIf Host *walkingdeadgraphicnovels.co.uk/shop/ MAGE_RUN_CODE=walking_dead_graphic_novels
SetEnvIf Host *walkingdeadgraphicnovels.co.uk/shop/ MAGE_RUN_TYPE=website
任何帮助将不胜感激
答案 0 :(得分:0)
你应该在你的htaccess中尝试这个:
# A Place in Space
SetEnvIf Host aplaceinspace\.co\.uk MAGE_RUN_CODE=base
SetEnvIf Host aplaceinspace\.co\.uk MAGE_RUN_TYPE=website
# Walking Dead Graphic Novels
SetEnvIf Host walkingdeadgraphicnovels\.co\.uk MAGE_RUN_CODE=walking_dead_graphic_novels
SetEnvIf Host walkingdeadgraphicnovels\.co\.uk MAGE_RUN_TYPE=website
并使用index.php中的原始块