ErrorDocument 403 Not Working

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 1
Joined: 14 Oct 2015, 14:24

ErrorDocument 403 Not Working

14 Oct 2015, 14:30

I've tried using a very simple config and this works on my local machine (Windows 10) but not on the remote server (Windows Server 2012 R2). Same version of Helicon Ape in both places (and both just freshly installed, so no other customizations), but the version of IIS is obviously different due to the different operating systems.

Code: Select all
RewriteEngine on
ErrorDocument 403 "No Access, Dude!"
Order Allow,Deny

On my local machine, I receive the "No Access, Dude!" message. On the remote server, I get the default IIS "403 - Forbidden: Access is denied." error instead of the one specified in my config. If I disable Helicon, everything comes up fine - so I don't think something else is creating the 403.

Anyone have any ideas?

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: ErrorDocument 403 Not Working

15 Oct 2015, 06:02

Hello.

Newer IIS versions by default suppress all error messages, including custom, if request is not made from localhost (that is why you see errors on your local machine).
To allow custom errors to pass through you need to add this to your web.config file:

Code: Select all
<configuration>
  <system.webServer>
    <httpErrors existingResponse="PassThrough" />
  </system.webServer>
</configuration>

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 30 guests