magento 创建多域名

1.magento后台system->magage stores

create website  : 比如m.shop.com,code:m_shop

create store: 使用新建的website,name:Main Store,Root Category:Root Catalog

create store view:使用新建的store,name:English,code:m_en,然后开启它

2.system->Configuration  选择左上角Current Configuration Scope选择你刚新建的

然后选择GENERAL->Web 设置Unsecure 和secure选项,去掉Use Default视图的单选框,Base URL填写m.shop.com

3.修改.htaccess,在文件最后添加

SetEnvIf Host www\.shop\.com MAGE_RUN_CODE=base 
SetEnvIf Host www\.shop\.com MAGE_RUN_TYPE=website

SetEnvIf Host m\.shop\.com MAGE_RUN_CODE=m_shop
SetEnvIf Host m\.shop\.com MAGE_RUN_TYPE=website

 

posted on 2014-08-12 15:01  怕淹死的鱼  阅读(290)  评论(0编辑  收藏  举报

导航