.htaccess重写规则不分裂我想要的地方

所以,我想打开以下url:

tags/tag1/tag2/tag3 

放入一个参数化的参数如下:

 tags.php?tags=tag1&tags=tag2&tags=tag3 

这给我留下了以下RewriteRules(其中包括)

 RewriteRule ^tags/([^/]+)(/.+)?$ tags.php?tags=$1$2 [C] RewriteRule ^tags.php?tags=([^/]+)/([^/]+)(/.+)?$ tags.php?tags=$1&tags=$2$3 [N] 

但是当我拉起标签variables使用PHP我得到"tag1/tag2/tag3" ,这导致我相信它没有正确运行。 任何人都知道为什么第二条规则甚至没有申请一次?

 # Mostly the same as your first one - tweaked to allow for the second capture # to be empty (1 tag) and to allow for (and ignore) a trailing slash: RewriteRule ^tags/([^/]+)(/?.*)/?$ tags.php?tags=$1$2 [C] # Again, minor tweak, allowing a blank string in the third match so the last # run of the mangling (when you have `tags=tags1&tags=tags2/tags3`) doesn't come # back with no match. RewriteCond %{QUERY_STRING} ^tags=([^/]+)/([^/]+)(/?.*)$ # Match the file exactly; only happens if the condition matched (if a slash # was found in the query params) RewriteRule ^tags.php$ tags.php?tags=%1&tags=%2%3 [N] 

我最后的结果是:

 RewriteRule ^tags/?$ tags.php [L] RewriteRule ^tags/&(tags\[\]=.*)$ tags.php?$1 [L] RewriteRule ^tags/([^/]+)(/?.*)$ tags/$2&tags[]=$1 [L] 

同样的事情,但build立在相反的。