开发者

Redirect from apache rewrite

开发者 https://www.devze.com 2023-02-19 10:56 出处:网络
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

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

精彩评论

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