How can i get the referer link when a user shown a page not found

Hi ,

If a user clicks on the link of the page that is removed or does not exists , he will be redirected to Page Not Found .

I tried this on the and check its showing PageNotFound  and the page  url in the browser remains same.

But in my case it redirecting to /utility/error-notfound ?

Why is this odd behaviour . We are on SaaS  ,

  • The redirect is likely due to a difference in the web.config. In particular, check the system.web/customErrors and system.webServer/httpErrors nodes, which should be as follows:

    <customErrors mode="RemoteOnly" redirectMode="ResponseRewrite" defaultRedirect="~/error.aspx">
    	<error statusCode="404" redirect="~/utility/error-notfound" />

    <httpErrors errorMode="DetailedLocalOnly" defaultResponseMode="ExecuteURL">
    	<clear />
    	<!--If you run your application under a virtual directory, update this value to reflect it  eg:/myAppName/utility/error-notfound-->
    	<error statusCode="404" path="/utility/error-notfound" responseMode="ExecuteURL" />

  • Turns out our web.config got modified for some mysterious reason