【发布时间】:2013-01-29 12:33:16
【问题描述】:
我想重写以下网址:
http://www.mywebsite.com/helloworld/
到
http://www.mywebsite.com/index.php?page=hellworld
以下规则非常适合完成这项工作:
RewriteRule ^(.*)/$ index.php?page=$1
但是,我有一个问题:
当我转到:http://www.mywebsite.com/helloworld(看看末尾的斜杠 (/) 不存在)时,该规则不起作用。但是使用http://www.mywebsite.com/helloworld/ 效果很好。
¿我能做些什么来解决这个问题?
【问题讨论】:
标签: php apache .htaccess mod-rewrite friendly-url