重写问题:把magento放在drupal安装目录里面

时间:2011-05-13 18:09:32

标签: drupal .htaccess magento

我已将magento放在名为store的子目录中的drupal安装中。

当我访问http://localhost/myshop/store时,magento主页显示没有问题但是当我尝试访问magento中的任何链接时(示例http://localhost/myshop/store/admin)我得到一个drupal页面,告诉我该页面未找到!

我应该怎样做才能将所有请求发送到/存储路径下,并将其发送给drupal的magento insted?

2 个答案:

答案 0 :(得分:1)

将您的.htaccess重写路径编辑为/ myshop

############################################
## you can put here your magento root folder
## path relative to web root

#RewriteBase /magento/

在.htaccess中查找此内容并取消注释RewriteBase并将/ magento /更改为您的目录名

答案 1 :(得分:1)

在Drupal的.htaccess文件中,即/myshop/.htaccess - 在之前添加以下,其中包含RewriteRule

RewriteCond %{REQUEST_URI} !^/store/

这会将您的Magento目录排除在Drupal的重写之外,因此允许Magento正常继续。您不需要为此更改Magento的/myshop/store/.htaccess文件。