开发者

Problem in rewriting links with htaccess

I'm using this htaccess file to rewrite links,

RewriteEngine on

RewriteRule ^([a-zA-Z]+)$ file.php?show=$1

But I'm havin开发者_运维百科g problem so, when i go to the page I wanted after rewrite like this: http://somesite.com/mypage It goes to that page successfully, but when you type a slash in the end of the link (http://somesite.com/mypage/) it doesn't open and says 404 error..

Please fix the code so I can enter pages with slashes or without


RewriteEngine on
RewriteRule ^([a-zA-Z]+)(\/)?$ file.php?show=$1
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜