I'm running a PHP based application on IIS8, under Windows Server 2012. I'm trying to use a custom error page for failed authentication attempts - by replacing the 401 error page.
Here is my web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="false" destination="https://my.website.co.uk" />
<rewrite>
<rules>
<rule name="Hide Yii Index" stopProcessing="true">
<match url="." />
<action type="Rewrite" url="index.php" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
</rule>
</rules>
</rewrite>
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="401" subStatusCode="-1" />
<error statusCode="401" path="/errors/401.htm" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
When I attempt to look at the website without supplying credentials, all I see is a blank page. The source of the page is totally blank too - no single html tag.
Any ideas how I make this work?