安装两个具有相同 php docroot 的商店后出现问题
我正在尝试在同一个托管帐户中设置多个商店,并且我研究了许多关于此事的有趣指南。
在我看来,我找到了最简单的解决方案 - 将我的 .com 网站映射到主机上的同一目录,并修改 .htaccess 以根据 URL 启动不同的网站,如下所示:
SetEnvIf Host .*anatscraftonia.* MAGE_RUN_CODE="anatscraftonia";
SetEnvIf Host .*anatscraftonia.* MAGE_RUN_TYPE="website";
我的第一个商店工作正常,但是当我去anatscraftonia.com ,我得到的总是 Magento 404 页面。 我检查了所有设置,定义了多个商店,上面的代码是从我添加的网站下的管理控制台复制/粘贴的。我为所有商店启用了主页,并为安全/不安全重新定义了基本 URL。我也尝试过将网站更改为商店,但没有任何改进。
我还缺少什么?我怎么知道它试图去哪个页面,或者它是否甚至“无路由”或完全被破坏了......
I am trying to setup multiple stores within same hosting account and I studied many interesting guides out there on the matter.
Seems to me I figured out simplest solution for me - map both my dot com sites onto the same directory on host, and modify .htaccess to launch different website depending on URL, like so:
SetEnvIf Host .*anatscraftonia.* MAGE_RUN_CODE="anatscraftonia";
SetEnvIf Host .*anatscraftonia.* MAGE_RUN_TYPE="website";
My first store works fine, but when I go to anatscraftonia.com , all I get always is a Magento 404 page.
I checked all settings, multiple stores are defined and code above is copy/paste from Admin console under Website I added. I have Home page enabled for All Stores and Base URL redefined for both Secure/Unsecure. I also tried changing website to store, with no improvements.
What else am I missing? How do I even know what page is it trying to go to, or whether it even gets “no-route” or just totally whacked…
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
几年前,我编写了一些快速而肮脏的代码来记录 Magento Community 1.3x 中的控制器调度过程。
http://alanstorm.com/magento_controller_dispatch_logging
我认为您无法将这些文件放入当前安装,但它应该让您知道在哪里放置一些日志记录功能,以了解 Magento 路由到 404 的原因。
I threw together some quick and dirty code a few years ago to log the controller dispatch process in Magento Community 1.3x.
http://alanstorm.com/magento_controller_dispatch_logging
I don't think you'll be able to drop those files into a current installation, but it should give you an idea where to stick some logging functions to see why Magento is routing to a 404.
我不是 100% 确定您要实现的目标,但为什么不使用 magento 的单个实例来处理商店和 magento 自己的多商店功能..
此处有完整详细信息 http://dx3webs.com/front/2010/08/magento-multistore-setup-under-plesk/ 帖子还包含 cpanel 说明的链接。
这些说明适用于多个域,但适用于子文件夹
I am not 100% sure what you are trying to achieve but why not use a single instance of magento to handle both stores and magentos own multi store capability..
full details here http://dx3webs.com/front/2010/08/magento-multistore-setup-under-plesk/ post contains links to cpanel instructions as well.
the instructions are for multiple domains but will work with sub folders