找了N多的,正则式都没有结果。
最后借鉴了一个例子。
(?!单词).
这个是为了匹配某单词,无后缀。
然后用(?:)的循环语句廓上,循环0次,就搞定了这个超级难题。
(?:(?!单词).)*
最后结合实际情况的 urlRewriter.xml
当网页请求中非/shop下面的cart,order,intro,point,customer的时候,自动跳转到seasar2.org网站。
<!-- LP Area -->
<rule>
<name>LP Area</name>
<condition name="user-agent">Mozilla</condition>
<from >^/shop/((?:(?!(cart|order|intro|point|customer)).)*)$</from>
<to type="redirect" last="true">http://seasar2.org/shop/$1</to>
</rule>
怎么样,看懂了没有,我也只是略懂而已。