俺是看不懂正则,求翻译。谢谢!
<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>
<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>
解决方案 »
- 项目中有个日志管理,如何让用户在执行操作时生成日志呢?
- SSH电子商务网站论文请教
- 写一程序,将"d","b","a","c"依次存入list中,并按照abcd的顺序用迭代器输出
- Struts2 用标签输出日期,怎么设置输出格式
- org.apache.commons.logging.Log 类的用法
- 筹建开源项目,欢迎大家提建议
- Hibernate中如何处理大量需要外连接的关系?
- id to load is required for loading
- 谁有JDOM操作XML的好例子?(添加,删除,修改 节点)
- Eclipse + Easy Struts 0.64 的菜鸟问题???
- 如何实何QQ邮箱里面excel附件文档的预览功能?
- 求助:webSphere中部署web service的问题
输入 http://localhost:8080/xxx/会自动转换成http://localhost:8080/xxx/news
http://localhost:8080/
转成
http://localhost:8080/news/
吧???
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