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 239 posts 573 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 3504 posts 12133 karma points MVP 8x 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

Please Sign in or register to post replies

Write your reply to:

Draft