Copied to clipboard

Flag this post as spam?

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


  • lori ryan 199 posts 529 karma points
    Aug 27, 2018 @ 13:25
    lori ryan
    0

    Umbraco rewrite rule to hide /umbraco

    Hi I have Umbraco working in a load balanced environment. I want to stop editors from being able to log on to the backend on one of the servers. Just wondering does anybody have an example of a rewrite rule that does this? Thanks in advance

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Aug 27, 2018 @ 15:43
    Dave Woestenborghs
    102

    Hi lori,

    You could do something like this :

     <rule name="Backoffice access" enabled="true">
              <match url="^umbraco(#/)?(#)?(.*)"/>
              <conditions logicalGrouping="MatchAll">
                <add input="{R:0}" pattern="^umbraco/masterpages/?" ignoreCase="true" negate="true"/>
                <add input="{R:0}" pattern="^umbraco/RestServices/?" ignoreCase="true" negate="true"/>
                <add input="{R:0}" pattern="^umbraco/webservices/?" ignoreCase="true" negate="true"/>
                <add input="{R:0}" pattern="^umbraco/Surface/?" ignoreCase="true" negate="true"/>
                <add input="{R:0}" pattern="^umbraco/api/?" ignoreCase="true" negate="true"/>
                <add input="{R:0}" pattern="^umbraco/ping.aspx" ignoreCase="true" negate="true"/>
                <add input="{HTTP_HOST}" pattern="^domainofeditorserver$" ignoreCase="true" negate="true"/>
              </conditions>
              <action type="Redirect" url="http://{HTTP_HOST}/"/>
            </rule>
    

    You will need to replace domainofeditorserver with the actual domain of your master or editing server.

    Dave

  • 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