Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Apr 26, 2011 @ 10:21
    Gordon Saxby
    0

    Switch out of as well as into HTTPS

    I need to make a couple of pages switch into HTTPS mode, but I also need to ensure that all other pages are HTTP.

    I have seen a package that allows you to switch into HTTPS but it does not appear to be suitable for v4.7.

    Is this something that could be done with URL Rewriting?

     

  • Jesper Hauge 298 posts 487 karma points c-trib
    Apr 26, 2011 @ 10:45
    Jesper Hauge
    1

    Hi Gordon,

    I've used SecuritySwitch for that. It's a one dll .NET library, configured through a config section in web.config, which means it's possible to just add the section declaration to web.config, and have the pages configured in its own config source file living in /config. Works perfectly for what you want.

    Here's a sample configuration:

    <!-- web.config -->
    <configSections>
     <section name="securitySwitch" type="SecuritySwitch.Configuration.Settings, SecuritySwitch" />
    </configSections>
    <securitySwitch configSource="config\SecurePages.config" />
    <!-- SecurePages.config -->
    <securitySwitch>
     <paths>
      <add path="~/login.aspx" matchType="Exact" />
     </paths>
    </securitySwitch>

    Which will set up your site to ensure that /login.aspx is using https, and switch back to http for all other pages, it even works for normal umbraco pages, as it looks at the request url coming in, not what it translates to after internal Umbraco url rewriting has taken place.

    Regards
    Jesper Hauge

  • Gordon Saxby 1461 posts 1883 karma points
    Apr 27, 2011 @ 10:03
    Gordon Saxby
    0

    Thanks Jesper, we are currently testing this to check if it does what we need ...

     

  • Gordon Saxby 1461 posts 1883 karma points
    May 03, 2011 @ 11:25
    Gordon Saxby
    0

    ... and yes it does :-)

     

Please Sign in or register to post replies

Write your reply to:

Draft