【发布时间】:2013-02-18 12:29:47
【问题描述】:
我正在重写这种网址
http://deia.info/category/calendar/10/
到
/index.php?task=browse_posts&catid=$2
通过.htaccess中的这段代码
RewriteRule ^category/(.+)/(.+) /index.php?task=browse_posts&catid=$2
这似乎可以完成这项工作。问题是在发送附加参数时,这些参数会被忽略。
例如:
http://deia.info/category/calendar/10/?start_date=10
isset($_GET['start_date']) 不会返回 true
为什么?
【问题讨论】:
-
添加到重写规则 [L,QSA] 看看会发生什么。
-
有效!如果你想。将其发布为答案:-)
-
当然。我现在就去做。
标签: php .htaccess url-rewriting get