简体   繁体   中英

IIS7 url rewrite for a specific port only

i have a webserver that I want to redirect only port 8800 to a different server. I want port 80 and 443 to be left on the same server. I tried using ARP and reverse proxy in IIS7. i created a reverse proxy rule that used the following parameters.

this is my inbound url mydomain.com:8800

i want to route it to myotherdomain.com

Wheni set this up it errors out and no one can access the website on any port.

Thanks.

first bind mydomain.com:8800 to a website then put config file to web root file name web.config content is ...

<?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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM