不区分大小写的Jboss 7 Web应用程序上下文根 [英] Case in-sensitive Jboss 7 web application context root
本文介绍了不区分大小写的Jboss 7 Web应用程序上下文根的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法使Web应用程序上下文不区分大小写?
Is there a way to make web application context case in-sensitive?
基本上我在jboss-web.xml中执行以下操作
Basically i'm doing the following in jboss-web.xml
<jboss-web>
<context-root>cap</context-root>
</jboss-web>
我能够通过localhost:8080/cap访问该应用程序,但尝试使其通过localhost:8080/Cap或localhost:8080/CAP进行访问.有什么想法吗?
I'm able to access the app via localhost:8080/cap, but trying to make it accessible via localhost:8080/Cap or localhost:8080/CAP. Any ideas please?
推荐答案
将apache + mod_proxy放在jboss前面,并使用url重写或重定向(更容易的选项). 重写示例:
Put apache+mod_proxy in front of jboss and use url-rewriting or redirection (easier option). Example of rewrite:
RewriteEngine on
RewriteRule ^/Cap$ /cap/ [R]
RewriteRule ^/CAP$ /cap/ [R]
您应将以上内容放入httpd.conf或类似位置.
You would put the above to httpd.conf or a similar location.
这篇关于不区分大小写的Jboss 7 Web应用程序上下文根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文