开发者

Problem in rewriting links with htaccess

开发者 https://www.devze.com 2023-03-25 03:23 出处:网络
I\'m using this htaccess file to rewrite links, RewriteEngine on RewriteRule ^([a-zA-Z]+)$ file.php?show=$1

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

精彩评论

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