【发布时间】:2011-08-16 11:28:34
【问题描述】:
似乎在使用 mod rewrite 时我不能使用正则表达式组,例如
results/(.*?)(/(.*?))(/(.*?))(/(.*?))(/(.*?))(/(.*?))(/(.*?))(/(.*?))(/(.*?))(/(.*?))
这会做这样的事情:
results.php?a=$1&b=$3&c=$5&d=$7&e=$9&f=$11&g=$13&h=$15&i=$17&j=$19
对于其中包含1 的数字,将附加$1 组和一个数字,例如
$1 是a+typical+get+query
而$19 是页码,它会返回a+typical+get+query9,您可以看到页码附加在末尾。
print_r($_GET):
Array
(
[a] => a typical get query
[b] => some other field for the query
[c] => 1
[d] => 1
[e] => 1
[f] => a typical get query1
[g] => a typical get query3
[h] => a typical get query5
[i] => a typical get query7
[j] => a typical get query9
)
为什么要这样做?
【问题讨论】:
标签: apache mod-rewrite get