我们正在运行 Magento CE 1.6.2,我们想运行另一家商店。我们已经正确配置了 store2.com,但是我们遇到了一个问题:
store1.com 重定向到 www.store1.com :好的 store2.com 和 www.store2.com 重定向到 www.store1.com :不好
这是我们的 .htaccess :
SetEnvIf Host .*store2.com MAGE_RUN_CODE=store2_com
SetEnvIf Host .*store2.com MAGE_RUN_TYPE=website
要将非 www 重定向到 www,我们正在使用:
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
这个配置不起作用。
我们使用托管域运行 store2.com,并在 store1.com 和 store2.com 之间共享托管。
希望你能帮助我们,对不起我的英语。
谢谢你的帮助昆汀