【问题标题】:IIS7 url rewrite for a specific port only仅针对特定端口的 IIS7 url 重写
【发布时间】:2014-04-07 18:17:37
【问题描述】:

我有一个网络服务器,我只想将端口 8800 重定向到另一台服务器。我希望将端口 80 和 443 留在同一台服务器上。我尝试在 IIS7 中使用 ARP 和反向代理。我创建了一个使用以下参数的反向代理规则。

这是我的入站网址 mydomain.com:8800

我想把它路由到 myotherdomain.com

当我设置它时出错,没有人可以通过任何端口访问该网站。

谢谢。

【问题讨论】:

    标签: url rewrite


    【解决方案1】:

    首先将 mydomain.com:8800 绑定到一个网站 然后把配置文件放到web root 文件名 web.config 内容是……

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="nexus respotory Redirect" stopProcessing="true">
                        <match url=".*"/>
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="^mydomain\.com$"/>
    
                        </conditions>
                        <action type="Redirect" url="http://myotherdomain/{R:0}" redirectType="Permanent" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-08-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-19
      • 2023-03-17
      • 2012-01-01
      • 2011-07-30
      相关资源
      最近更新 更多