我的wordpress博客安装在一个subfoler:/ wp / . 我在所用主题的目录中创建了一个子文件夹:/ test /
但是当我尝试通过网址访问时:http // www.domain.com / wp / test / . 我有一个错误404
我在wordpress根目录中的.htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteCond %{REQUEST_URI} ^/test/(.*)$ [OR]
RewriteRule ^.*$ - [L]
</IfModule>
# END WordPress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php
</IfModule>
# END WordPress
我的.htaccess在\ test \文件夹中:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/test/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>
1 回答
用这个替换你的规则: