Wordpress 主目录中的Htaccess与子目录冲突

Wordpress 主目录中的Htaccess与子目录冲突,wordpress,.htaccess,seo,opencart,Wordpress,.htaccess,Seo,Opencart,我正在为一个客户使用两种不同的开源系统。 在主目录中,我安装了wordpress。 在子目录(/shop)中,我安装了OpenCart 1.5.5 我想在OpenCart中启用SEO url,但当我启用此功能时,我的url变为: www.example.com/shop/category 然后,来自wordpress的主htaccess检查它是否知道wordpress中的类别和帖子,并返回404 如果有人能为我找到解决方案,我会非常高兴! 谢谢你的努力 从Wordpress访问HTC: Rewr

我正在为一个客户使用两种不同的开源系统。 在主目录中,我安装了wordpress。 在子目录(/shop)中,我安装了OpenCart 1.5.5

我想在OpenCart中启用SEO url,但当我启用此功能时,我的url变为: www.example.com/shop/category 然后,来自wordpress的主htaccess检查它是否知道wordpress中的类别和帖子,并返回404

如果有人能为我找到解决方案,我会非常高兴! 谢谢你的努力

从Wordpress访问HTC:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
从opencart访问HTC:

Options +FollowSymlinks
Options -Indexes

<FilesMatch "\.(tpl|ini|log)">
 Order deny,allow
 Deny from all
</FilesMatch>

RewriteEngine On
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Options+FollowSymlinks
选项-索引
命令拒绝,允许
全盘否定
重新启动发动机
重写基/
重写规则^sitemap.xml$index.php?route=feed/google_sitemap[L]
重写规则^googlebase.xml$index.php?route=feed/google_base[L]
重写规则^download/(.*)/index.php?route=error/not_found[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写条件%{REQUEST\u URI}!。*\。(ico | gif | jpg | jpeg | png | js | css)
RewriteRule^([^?]*)index.php?_route_uu=$1[L,QSA]

将OpenCart
.htaccess
中的
RewriteBase
指令更改为

RewriteBase /shop/

将OpenCart
.htaccess
中的
RewriteBase
指令更改为

RewriteBase /shop/

不确定这是否有效,因为我没有办法在本地进行测试。将Wordpress htaccess更改为:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/shop
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

不确定这是否有效,因为我没有办法在本地进行测试。将Wordpress htaccess更改为:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/shop
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]