Currently working on error pages for my website in ASP.NET. I'm using a web configuration file to redirect the user to an error page if the server was unable to find the requested page. Below is the customErrors tag I used in my configuration file:
<customErrors mode="On" defaultRedirect="~/ErrorPages/Error.aspx">
<error statusCode="404" redirect="~/ErrorPages/Error.aspx"/>
</customErrors>
It's currently working but my problem is that I don't want the user to see my error page in the URL as displayed below:
/MySite/ErrorPages/Error.aspx?aspxerrorpath=/MySite/ImaginaryPage.aspx
I'm expecting something like what google has: Google Error Page
Is there a way to do this without Javascript?