Tomcat应用程序:重写IIS7的规则

时间:2013-05-28 13:14:06

标签: tomcat iis url-rewriting reverse-proxy url-redirection

我已经能够使用IIS7反向代理和重写规则将端口8080和8090上运行的tomcat应用程序的URL重写为此格式“http://localhost/app1”, 我使用的示例代码如下......

<rule name="ReverseProxyInboundRule2" stopProcessing="true">
  <match url="(alfresco.*)" />
  <conditions>
    <add input="{CACHE_URL}" pattern="^(http?)://" />
  </conditions>
  <action type="Rewrite" url="{C:1}://localhost:8090/{R:1}" />
</rule>

现在我希望它使用的格式是这样的:app1.myhost.com, app2.myhost.com

myhost.com可以引用我的本地主机名,我已经在Windows目录的hosts文件中定义了它。
我尝试了很多方法,但他们都在网址前附加www.

0 个答案:

没有答案