想问一下各位高手,因为目前项目是java写的,已经编写完毕但是考虑到安全性,要将jsp后缀的url重写成html,htm在网上查了之后 看到了用urlrewrite技术的话需要配置
<rule>
<from>/(.*).html</from>
<to>index.jsp?id=$1</to>
</rule> 但如果考虑的页面很多 , 那不是需要一个个配置吗?有没有统一配置的方法?nginx,有朋友说很方便,我在网上查了后也不是很详细,用这个方便吗?有朋友用过吗?
<rule>
<from>/(.*).html</from>
<to>index.jsp?id=$1</to>
</rule> 但如果考虑的页面很多 , 那不是需要一个个配置吗?有没有统一配置的方法?nginx,有朋友说很方便,我在网上查了后也不是很详细,用这个方便吗?有朋友用过吗?
解决方案 »
- 在连接数据库的类中调用executeQuery(),却显示找不到符号呢???
- 怎样把flex嵌入到jsp中使用
- 【求助】Hibernate异常:null id *** entry
- 求解、php+java开发
- validate框架拦截拦截了Ajax请求并对请求进行了相应,可以解决吗?
- Hibernate3.0生成表问题,在线等
- 关于关闭网页后,出现的奇怪问题......
- weblogic 怎么运行servlet
- 怎么样说服公司领导在新项目中抛弃原来的公司烂包,采用spring?
- Spring配置问题
- 关于SSH+MYSQL遇到的一个问题,请求帮助
- Struts2中,Action中字段是在什么时候放到request的attributes里的
<from>/(.*).html</from>
<to>index.jsp?id=$1</to>
</rule> 这个不方便吗? 用了正则表达来匹配页面呀。不过你怎么好像写反了。
<rule>
<from>/(.*).jsp(.*)</from>
<to>/$1.html</to>
</rule>
<rule>
<from>^/([a-z]+)$</from>
<to type= "forward" >/world.jsp?id=$1</to>
</rule>
<rule>
<from>^/world/(.*)$</from>
<to>/world.jsp?tid=$1</to>
</rule>
<rule>
<from>^/(.*).html$</from>
<to>/test1/$1.jsp</to>
</rule>
<outbound-rule>
<note>
The outbound-rule specifies that when response.encodeURL is called (if you are using JSTL c:url)
the url /rewrite-status will be rewritten to /test/status/.
The above rule and this outbound-rule means that end users should never see the
url /rewrite-status only /test/status/ both in thier location bar and in hyperlinks
in your pages.
</note>
<from>/rewrite-status</from>
<to>/test/status/</to>
</outbound-rule>
</urlrewrite>