【发布时间】:2014-08-18 21:48:45
【问题描述】:
我在.htaccess 中有一条规则,它根据 url 语法生成查询字符串:
RewriteEngine on
RewriteRule a_([0-9]+)_(.*).html$ article.php?id=$1 [L]
所以一个这样的网址:
a_52_how-to-use-htaccess.html 生成:article.php?id=52
我的问题是如何允许 htaccess 向查询字符串中添加其他在 url 上发送的 get 变量:
a_52_how-to-use-htaccess.html?debug=true
为了拥有:
article.php?id=52&debug=true
有什么想法吗?谢谢。
【问题讨论】:
标签: regex apache .htaccess mod-rewrite get