开发者

Redirect from apache rewrite

I want t开发者_StackOverflow社区o redirect

/na to /na.php

Now, I'm using wordpress and I don't want to create page from wordpress. So, I add

RewriteRule ^na$ /na.php

but it's not working. How should I write it ?

I updated like following but still no luck

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteRule ^na$ /na.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


</IfModule>
# END WordPress


RewriteRule ^na$ /na.php [L]

The first argument for the RewriteRule omits the leading slash, and if you don’t check for the exact string you’ll run into an infinite loop. The [L] prevents further processing of the request.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜