在Wordpress之外使用子文件夹会给出404错误


Using a subfolder outside of Wordpress is giving 404 errors

我在根目录上安装了Wordpress,并且我正在使用一个名为"uploads"的子文件夹作为我正在使用的文件上传脚本。问题是我在 Wordpress (site.com/subpage) 中导航到子页面时收到 404 错误。我相信这是我的htaccess文件有问题。我已经尝试了几种变体,但这是我目前正在使用的:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/uploads/(.*)$ [OR]
RewriteRule ^.*$ - [L]
</IfModule>

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index'.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

有关产生 404 错误的任何线索将不胜感激!

您能否尝试用子文件夹的路径替换重写基础?

即从

RewriteBase /

RewriteBase /subpage/

在 htaccess 中的所有重写基本语句中执行此操作