magento 1.6 IIS下多网站
我通过 Godaddy 获得了 Windows Server 2008 R2 标准虚拟服务器。
我在 IIS 7.5 下部署了 magento 社区 1.6.1.0,并且工作正常。
我尝试按照此链接使用一个后端来管理多个网站
http://www.magentocommerce.com/knowledge-base/entry/overview-how-multiple-websites-stores-work
我创建了一个与基础 magento 处于同一级别的傻瓜安装文件夹 复制index.php和.htaccess文件到这里,修改index.php为Mage::run('mysite1', 'website'); 在IIS中创建一个新网站并指向该文件夹 为这个新网站的独家新闻配置 Web 选项卡以配置基本 url 和安全基本 url
问题是,当我访问新域时,它总是重定向到默认 magento 商店的基本网站。
我做了一些搜索,有些帖子说“重定向到基本网址选项”,但无处可寻。 我还尝试将“自动重定向到基本 URL”设置为“否”,但这没有帮助。
谁能帮我解决这个问题吗?
谢谢
I got windows server 2008 r2 standard virtual server with godaddy.
I have magento community 1.6.1.0 deployed under IIS 7.5 and it is working fine.
I tried to follow this link to use one backend to manage multiple website
http://www.magentocommerce.com/knowledge-base/entry/overview-how-multiple-websites-stores-work
I have created a foolder in the same level as the base magento install folder
copy index.php and .htaccess file here, modify index.php to Mage::run(’mysite1’, ‘website’);
create a new website in IIS and pointed to this folder
configure the web tab for the scoop of this new website to configure the base url and secure base url
problem is that when i visit the new domain, it always redirect to the base website the default magento store.
i did a bit search, some post said “redirect to base url option”, but it is nowhere to be found.
i also tried to set “Auto-redirect to Base URL” to no, but it is not helping.
can anyone help me out of this?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不需要不同的 index.php,
如果您的主站点是 www.mainsite.com 并且是 Magento 中的“mainsite”,并且您的新域是 www.anothersite.com 并且是“anothersite”,则 然后将此代码放入您的索引中。 php :
我个人更喜欢使用 Mage::run('anothersite', 'store');
现在 - 非常重要 - 您需要进入 Magento 配置,在其中输入前端和后端 URL 并切换到新的网站级别。然后您可以覆盖默认值并放入新域。
希望这会有所帮助 - 如果您需要进一步扩展解决方案,请告诉我
Barny
You don't need a different index.php
if your main site is www.mainsite.com and is "mainsite" in Magento AND your new domain is www.anothersite.com and is "anothersite" then put this code in your index.php :
Personally I prefer to use Mage::run('anothersite', 'store');
Now - VERY IMPORTANT - you need to go into Magento config where you put the FRONT and BACKEND URLS in and switch to the new website level. You can then override the default and put in the new domain.
Hope this helps - if you need further expansion on the solution please let me know
Barny
它应该通过 .htaccess 文件完成。您应该在底部添加以下代码:
MAGE_RUN_CODE 必须与您在创建网站时在 Magento 后台输入的网站代码相对应。
It is meant to be done via the .htaccess file. You should add the following code at the bottom:
The MAGE_RUN_CODE must correspond to the website code you have entered in the Magento backoffice when creating that website.