Hi folks,
I have recently entered the world of IIS and one of the first things I picked up is the URL Rewrite module, I've used it for all sorts of rewrites and feel fairly comfortable until I picked up this query.
I am using Umbraco and wish to hide the umbraco login page based on IP addres so that a small set of IP addresses can still see it. I've scoured Google and various forums trying different methods, the simplest seems to be the following, bearing in mind I also have load balancing in the mixture hence the use of HTTP-X-FORWARDED-FOR.
Here is my example, if anyone could offer advice, I have also tried 'escaping' the IP addresses using . but this made no difference:
<rule name="Allowed IPs" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{URL}" pattern="/Umbraco/*" />
<add input="{URL}" pattern="/Umbraco/surface/*" negate="true" />
<add input="{URL}" pattern="/Umbraco/cms-api/*" negate="true" />
<add input="{HTTP_X_FORWARDED_FOR}" pattern="127.0.0.1" negate="true" />
<add input="{HTTP_X_FORWARDED_FOR}" pattern="***.***.***.***" negate="true" />
</conditions>
<action type="CustomResponse" statusCode="404" statusReason="Access Denied." statusDescription="Access Denied." />
</rule>