开发者

Help me with the Clean URL problem

I have an .htaccess file set up like so:

RewriteEngine on
RewriteRule ^home/    /member.php [L]

So when users type http://domai开发者_如何学Cnname.com/home/ it goes to the member page, but when they type http://domainname.com/home I get a 404 error.

What am I doing wrong?


Because your rule only applies if a / is added after the home part.

Off the top of my head, this should do it:

RewriteEngine on 
RewriteRule ^home(/)? /member.php [L]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜