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

Tomcat应用程序:IIS7的重写规则,tomcat,iis,url-rewriting,reverse-proxy,url-redirection,Tomcat,Iis,Url Rewriting,Reverse Proxy,Url Redirection,我已经能够将运行在端口8080和8090上的tomcat应用程序的URL重写为类似以下格式“http://localhost/app1“使用IIS7反向代理和重写规则, 我使用的示例代码如下 <rule name="ReverseProxyInboundRule2" stopProcessing="true"> <match url="(alfresco.*)" /> <conditions> <add input="{CACHE_URL

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

<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目录下的主机文件中定义了它。

我试过很多方法,但都是在url前面加上
www.

我不太明白你的问题。你有一个明确的例子来说明你想做什么吗?让我这样说,我希望app1.myhost.com重定向到一个tomcat应用程序,其url类似于以下localhost:8080/app1,而不更改url,即app1.myhost.com关闭此线程,解决它:)