俺是看不懂正则,求翻译。谢谢!
         <rule>
<from>^/$</from>
<to>/news/</to>
</rule>
<rule>
<from>^/((css|js|pic|img)/.*)$</from>
<to>/$1</to>
</rule>
<rule>
<from>^/(.*\.favicon.ico)$</from>
<to>/$1</to>
</rule>
<rule>
<from>^/gadgets/list/$</from>
<to>/news/gadgets/list/1/</to>
</rule>
<rule>
<from>^/(.*)$</from>
<to>/news/$1</to>
</rule>

解决方案 »

  1.   

    偶只看懂第一个,
    输入 http://localhost:8080/xxx/会自动转换成http://localhost:8080/xxx/news
      

  2.   

    我觉得第一个应该是
    http://localhost:8080/
    转成
    http://localhost:8080/news/
    吧???
      

  3.   

    第一个应该是
    http://localhost:8080/
    转成
    http://localhost:8080/news/第二个应该是
    http://localhost:8080/css/**/**/**
    http://localhost:8080/js/**/**/**
    http://localhost:8080/pic/**/**/**
    http://localhost:8080/img/**/**/**
    根目录后面以css/js/pic/img开头的保持不变第三个是:
    http://localhost:8080/**/**/**.favicon.ico
    以.favicon.ico的结尾的,保持不变第四个是
    http://localhost:8080/gadgets/list/
    转换为
    http://localhost:8080/news/gadgets/list/1/第五个是
    http://localhost:8080/*********
    转化成
    http://localhost:8080/news/*********
    统一加上个news