【发布时间】:2016-01-10 17:37:53
【问题描述】:
我的 .htaccess 文件有问题。
如果我把这个放在我的 .htaccess 规则中:
重写规则 ^post/([^/]*)$ /the_post.php?id=$1 [L]
我将能够像这样浏览网址:
http://www.example.com/post/12
但如果我尝试:
http://www.example.com/post/12/
或
http://www.example.com/post/12/something-else-here
该页面未创建。
允许任何可能的 url 组合的正确方法是什么?
- http://www.example.com/post/12
- http://www.example.com/post/12/
- http://www.example.com/post/12/something-else-here
感谢您的宝贵时间!
【问题讨论】:
标签: php apache .htaccess mod-rewrite