Copied to clipboard

Flag this post as spam?

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


  • Max Mumford 266 posts 293 karma points
    Aug 26, 2011 @ 12:08
    Max Mumford
    0

    SSL for specific directory

    Hi all,

    I am setting up SSL for a specific directory and have (so far) decided to go the route of using urlrewriting.config to map specific paths to https and everything else to http as per Kalpa's post in the thread here:

    http://forum.umbraco.org/yaf_postst3224p2_SSL-and-umbraco.aspx

    So far I have the following code in my config/urlrewriting.config file.

    <add name="EnforceSSLForSupport" 
                        virtualUrl="http://(.*)/support(.*)" 
                        rewriteUrlParameter="ExcludeFromClientQueryString" 
                        destinationUrl="https://$1/support$2"
                        ignoreCase="true" 
                        redirect="Domain"
                        redirectMode="Permanent"/> 

    Normal pages work fine but navigating to the support directory results in a redirect loop. Has anybody acheived a similar thing using urlrewriting and can help me out?

    Thanks,

    Max.

  • Max Mumford 266 posts 293 karma points
    Aug 26, 2011 @ 12:17
    Max Mumford
    0

    Missed out this key:

    <add name="NoSSL" 
                        virtualUrl="https://(.*)(?!support.*)" 
                        rewriteUrlParameter="ExcludeFromClientQueryString" 
                        destinationUrl="http://$1"
                        ignoreCase="true" 
                        redirect="Domain"
                        redirectMode="Permanent"/> 
Please Sign in or register to post replies

Write your reply to:

Draft