oracle Weblogic 11g URL 重写
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3637147/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Weblogic 11g URL Rewrite
提问by A. Wilson
I have a client running a WebLogic 11g install on a Windows Server machine who wishes to implement Apache-style mod_rewrite-like functionality to translate requests for http://easyurl.comto http://super.complicated.com/with/this/junk?here=and_more. I have scoured the Internet for advice, but all I can find are other people who are asking the same question and not getting any answer. Assuming that installing 3rd-party apps is not an option, how do I implement this in WebLogic?
我有运行的WebLogic客户端的11g安装Windows Server机器谁希望实现对Apache风格mod_rewrite-like的功能,为请求翻译http://easyurl.com到http://super.complicated.com/with/this /junk?here=and_more。我在互联网上搜索过建议,但我只能找到其他提出相同问题但没有得到任何答案的人。假设安装 3rd-party 应用程序不是一种选择,我如何在 WebLogic 中实现它?
Edit: Now that I think about it, this question probably belongs on Server Fault. I'll move it there.
编辑:现在我想想,这个问题可能属于服务器故障。我会把它移到那里。
Further edit: https://serverfault.com/questions/177795/url-rewrite-in-weblogic-11gis the Server Fault link.
进一步编辑:https: //serverfault.com/questions/177795/url-rewrite-in-weblogic-11g是服务器故障链接。
采纳答案by Pascal Thivent
If you are using Apache HTTPD with the Apache HTTP Server Plug-Inin front of WebLogic, then it should be possible to use
mod_rewrite
before to send request to WebLogic.If not, then you could use Tuckey's Url Rewrite Filter(a Java Filter) that allows to rewrite URLs in a
mod_rewrite
like manner at the application server level.
如果您在WebLogic 前面使用带有Apache HTTP Server Plug-In 的Apache HTTPD ,那么应该可以使用
mod_rewrite
before 向 WebLogic 发送请求。如果没有,那么您可以使用 Tuckey 的Url Rewrite Filter(一种 Java 过滤器),它允许
mod_rewrite
在应用程序服务器级别以类似的方式重写 URL 。
回答by BestPractices
There is no way to do this out of the box with weblogic. The least invasive is to implement Pascal's suggestion of a url rewrite filter. I had the exact same requirement (implement this with just weblogic, no additional code as it would have to be managed/documented, etc) and there was no way to do this.
使用 weblogic 无法开箱即用地执行此操作。侵入性最小的是实施 Pascal 的 url 重写过滤器建议。我有完全相同的要求(仅使用 weblogic 实现这一点,没有额外的代码,因为它必须被管理/记录等)并且没有办法做到这一点。
回答by Lincoln
I would use either PrettyFaces or OCPsoft Rewrite for this. Both are more updated solutions to the URL-rewriting domain:
为此,我会使用 PrettyFaces 或 OCPsoft Rewrite。两者都是针对 URL 重写域的更新解决方案:
http://ocpsoft.com/prettyfaces/