C
cpnet
I've figured out how to use the <customErrors/> element in my web config
file to to redirect 404 errors to a custom error handler. But, it displays
an 'ugly' URL in the client's browser. For example, if someone browses to:
www.mydomain.com/Users/BobJones/
then my app should display a page with info about Bob Jones.
www.mydomain.com/Users/ is a real folder on my website that only contains a
single file (default.aspx). I've configured my app so that when the user
browses to www.mydomain.com/Users/BobJones/, a 404 error will be caused, and
will redirect the user to www.mydomain.com/Users/Default.aspx. The
Default.aspx page knows that the user was actually trying to go to
www.mydomain.com/Users/BobJones/, so Default.aspx displays info about Bob
Jones. All of that is working fine.
The problem though is that when the user tries to browse to
www.mydomain.com/Users/BobJones/, the actual URL that shows up in IE is:
www.mydomain.com/Users/Default.aspx?aspxerrorpath=/Users/BobJones
How can I get IE to simply display, www.mydomain.com/Users/BobJones/, in the
address bar (even though the content is being generated by
www.mydomain.com/Users/Default.aspx)?
Thanks.
file to to redirect 404 errors to a custom error handler. But, it displays
an 'ugly' URL in the client's browser. For example, if someone browses to:
www.mydomain.com/Users/BobJones/
then my app should display a page with info about Bob Jones.
www.mydomain.com/Users/ is a real folder on my website that only contains a
single file (default.aspx). I've configured my app so that when the user
browses to www.mydomain.com/Users/BobJones/, a 404 error will be caused, and
will redirect the user to www.mydomain.com/Users/Default.aspx. The
Default.aspx page knows that the user was actually trying to go to
www.mydomain.com/Users/BobJones/, so Default.aspx displays info about Bob
Jones. All of that is working fine.
The problem though is that when the user tries to browse to
www.mydomain.com/Users/BobJones/, the actual URL that shows up in IE is:
www.mydomain.com/Users/Default.aspx?aspxerrorpath=/Users/BobJones
How can I get IE to simply display, www.mydomain.com/Users/BobJones/, in the
address bar (even though the content is being generated by
www.mydomain.com/Users/Default.aspx)?
Thanks.