Redirecting from an error page?

Is it possible to re-direct from an error page? So instead of the error page being displayed, i can make a different page come up?

Im asking because i have some password protected areas on my site, and if sombody closes the password box without entering the right info, an "access denied" page comes up. Its ugly, and i'd rather just have the user be able to close the box and still be on the same page.

Is that possible?

 

 

 

 

Top