重写问题:将magento放入drupal安装目录中
我已将 magento 放入 drupal 安装中名为 store 的子目录中。
当我访问 http://localhost/myshop/store magento 主页显示没有问题,但是当我尝试访问magento 内的任何链接(例如 http://localhost/myshop/store/admin)我得到一个 drupal 页面这告诉我找不到该页面!
我应该怎么做才能将 /store 路径下的所有请求分派到 drupal 的 magento insted ?
I have put magento inside a drupal installation in a subdirectory called store.
When I access http://localhost/myshop/store magento home page is showed without problem but when i try to access any link inside magento (example http://localhost/myshop/store/admin) i get a drupal page that tells me that the page is not found !
What should I do to make all request under /store path be dispatched to magento insted of drupal ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将您的 .htaccess 重写路径编辑为 /myshop
在 .htaccess 中查找此路径并取消注释 RewriteBase 并将 /magento/ 更改为您的目录名称
edit your .htaccess rewrite path to be /myshop
look for this in .htaccess and uncomment RewriteBase and change /magento/ to your directory name
在 Drupal 的
.htaccess
文件(即/myshop/.htaccess
)中,在RewriteRule< 行之前添加以下内容 /代码> 在其中。
这会将您的 Magento 目录排除在 Drupal 重写之外,从而允许 Magento 继续正常运行。您不需要为此更改 Magento 的
/myshop/store/.htaccess
文件。In the
.htaccess
file for Drupal - that is,/myshop/.htaccess
- add the following before the line withRewriteRule
in it.This excludes your Magento directory from Drupal's rewriting and so allow Magento to continue as normal. You shouldn't need to change Magento's
/myshop/store/.htaccess
file for this.