I have a file named error.php
, it takes the value GET or an already defined variable and displays the errors in multiple languages and of all types.
I use IIS and already tried in Web.config to use PHP pages, but I did not succeed, I only get HTML pages that is not my purpose.
How can I use the error.php file as an error page in Web.config?
Current Web.config:
<?xml version="1.0" encoding="UTF-8">
<configuration>
<system.webServer>
<httpErrors errorMode="Custom">
<remove statusCode="401" />
<error statusCode="401" path="sys\error1.html responseMode="File" />
.....
</httpErrors>
</system.webServer>
</configuration>
And I tried to use it in the following way, but it did not work:
<error statusCode="401" path="sys\error.php?number=401" responseMode="File" />