.htaccess重写两个变量


.htaccess rewrite two variables

这是我当前的重写行

RewriteRule ^cam/([^/]+) /index.php?cate=$1[L]

然而,在cate=$1之后,我需要定义另一个变量,我需要确定$currentpage

那么RewriteRule ^cam/([^/]+)/呢?/index.php?cate=$1&currentpage=[L]

我在不确定会发生什么的地方打了两个毫无风格的问号。谢谢你的帮助,我希望我已经把我正在挣扎的事情说清楚了。

使用:

RewriteRule ^cam/([^/]+)/([^/]+)/?$ /index.php?cate=$1&currentpage=$2 [NC,L]
RewriteRule ^cam/([^/]+)/?$ /index.php?cate=$1 [NC,L]