当网址为www.xxx.com/theproblem/is-here.html
. 我想得到is-here.html
,但有这个规则....
RewriteRule ^([a-z\-\_A-Z0-9]+)/([^/]+)?(?<!\.html)\b/?(([^/]+)\.html)?$ this.php?param1=$1¶m2=$2¶m3=$3
... param3 的返回值为here.html
. 那是因为参数 2 得到is-
.
为什么会这样?
我想实现这个目标:
www.xxx.com/theproblem/is-here.html. -> param1=theproblem | param2=is-here.html
www.xxx.com/theproblem/why-this/ -> param1=theproblem | param2=why-this
www.xxx.com/theproblem/why-this/is-here.html. -> param1=theproblem | param2=why-this | param3=is-here.html
我怎样才能做到这一点?