G
Guest
I think I am missing something about how to redirect to a certain page when
404 errors occur. I want to redirect to a generic pagenotfound.aspx page. I
have the following in web.config:
<customErrors mode="RemoteOnly" defaultRedirect="/misc/pagenotfound.aspx">
</customErrors>
However, when I enter a non-existent URL I just get the default Page Not
Found error page - my pagenotfound.aspx file is not invoked (it works fine if
I enter the full URL of the http://www.mysite.com/misc/pagenotfound.aspx page
directly, so there is no issue with the page itself).
I have this working fine on an ASP.Net 1.1 site.
Any ideas on what I am doing wrong?
Thanks.
404 errors occur. I want to redirect to a generic pagenotfound.aspx page. I
have the following in web.config:
<customErrors mode="RemoteOnly" defaultRedirect="/misc/pagenotfound.aspx">
</customErrors>
However, when I enter a non-existent URL I just get the default Page Not
Found error page - my pagenotfound.aspx file is not invoked (it works fine if
I enter the full URL of the http://www.mysite.com/misc/pagenotfound.aspx page
directly, so there is no issue with the page itself).
I have this working fine on an ASP.Net 1.1 site.
Any ideas on what I am doing wrong?
Thanks.