Wordpress 已经安装在根目录中,我也在子目录中安装了 wordpress,但问题是子目录 URL 不起作用。它总是给出 404 错误根https://boochcraft.com/子目录网址https://boochcraft.com/shop根目录.htaccess# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</IfModule># END WordPress子目录 .htaccess# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /shop/RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ./shop/index.php [L]</IfModule># END WordPress
3 回答
阿晨1998
TA贡献2037条经验 获得超6个赞
从子目录中 .htaccess 文件的最后一条规则中删除 /shop (RewriteBase 保持不变)。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
- 3 回答
- 0 关注
- 255 浏览
添加回答
举报
0/150
提交
取消