Can I do a URL Rewrite to a different Tomcat instance?

旧时模样 提交于 2019-12-08 15:10:30

You can't simply rewrite to another instance. You'd either have to fetch the content from another instance (e.g. using `new URL("http://localhost:8081/foo").openConnection()....´) or redirect the client using a 30x redirect. If you have a proxy in front of your Tomcats, you might be able to configure it to resolve the redirect directly instead of sending it to the client.

If you want to proxy the request then you need to use mod_jk or mod_proxy in Apache to proxy the request to a different machine. If you are OK with issuing a redirect then it should work fine with just URL Rewrite.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!