Wordpress Htaccess -停止子目录自动重定向到根索引


Wordpress Htaccess - stop subdirectory auto redirecting to root index

我想在wordpress上创建一个子目录

http://wpsite.com/codeigniter,http://wpsite.com/someothersubdir

但是当我进入那个url时,它总是重定向到wordpress站点并显示"page not found"

这是wordpress的根htaccess文件

# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
# 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

如何使子目录从wordpress分离?谢谢你

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

在我的情况下,问题是在子文件夹的htaccess(我有另一个wordpress运行,用于测试目的)。所以我必须将子文件夹的.htaccess改为:

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