简体   繁体   中英

IIS web URL redirect to subfolder over http to https different port

I am using IIS 7.5 in my server for the webserver. request your support for the URL redirection from HTTP to HTTPS. My HTTP service is running on the 80 port and the HTTPS is running on the 4545 port. due to the port change getting problem.

also please help me to redirect from the root folder to the subfolder on the 4545 port.

You can use this URL Rewrite Rule:

    <rewrite>
            <rules>
                <rule name="HTTPS Redirect" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="^OFF$" />
                    </conditions>
                    <action type="Redirect" url="https://localhost:4545/..." appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>

The URL part of this rule needs to be modified by yourself.

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