开发者

Apache Mod Rewrite Conf to ignore part of URL

Let's say I have the domain http://www.example.com.

When I browse to http://www.example.com/12345 it brings me the person having id 12345 from database. I want it to work even I write some other meaningless bunch of characters at the end of the URL; h开发者_如何学Pythonttp://www.example.com/12345/qwerty.

This is the current config:

RewriteRule ^/(\d+)$ /person.php?id=$1 [QSA,L]

What should I add to this config?


RewriteRule ^/(\d+) /person.php?id=$1 [QSA,L]

ignores everthing after the numbers..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜