我想将/ naredirect到/na.php
所以我在.htaccess中写下如下。 我不想为/ na创buildwordpress页面。 只是想redirect。
但它不工作,总是显示404错误。
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^na$ [NC] RewriteRule . /index.php [L] RewriteCond %{REQUEST_URI} ^na$ [NC] RewriteRule . /na.php [L] </IfModule> # END WordPress
重写从na到na.php它应该是
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteCond %{REQUEST_URI} ^na$ [NC] RewriteRule ^na$ /na.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
问候