Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ganesh 1 post 71 karma points
    Dec 28, 2016 @ 13:38
    Ganesh
    0

    URL Redirection

    Hello All, Can any one give an example how could I redirect "https url to http" and "https url to https" using URLRewritingnet. I am able redirect http url to http. Thanks in advance.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 28, 2016 @ 13:44
    Dennis Aaen
    0

    Hi Gamesh and welcome to our :-)

    Perhaps this blogpost can help you getting your http to be redirected to https. You can do it directly in the web.config.

    http://blog.nancyfx.org/permament-redirect-to-https-with-iis/

    By adding something like this:

    system.webServer>
        <rewrite>
            <rules>
                <rule name="HTTP to HTTPS redirect" stopProcessing="true">
                    <match url=".*" />
                    <conditions>
                        <add input="{HTTPS}" pattern="OFF" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:0}" redirectType="Permanent" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
    

    Hope this helps,

    /Dennis

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies