In trying to create custom pages in my asp application I found out that this code in the web config file can be used to redirect to its related custom page.
<system.webServer>
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404"/>
<remove statusCode="500"/>
<remove statusCode="503"/>
<error statusCode="404" path="404.aspx" responseMode="Redirect"/>
<error statusCode="500" path="500.aspx" responseMode="Redirect"/>
<error statusCode="503" path="503.aspx" responseMode="Redirect"/>
</httpErrors>
</system.webServer>
So, I created 3 custom pages (404.aspx, 500.aspx and 503.aspx), and I showed the custom errors for each page as follows
404: 404 Page not found
500: Something went wrong. Please try again later or call Contact Support
503: Site is temporarily unavailable due to maintenance. Please check back later
My question is:
With this custom error pages created and the code in the web config file, will it automatically redirect to the custom pages accordingly, regardless of the server the application is being hosted?