I know how to redirect pages with Rewrite. But when there is a 404 page how would i display my own custom 404 page (i know i can rewrite it) and say this is in fact a 404 and not just a plain rewritten page?
-edit-
How i can SET the error code instead of asking the server? if the user goes to /user/invaliduser/ i would like to send a 403 or 404 but my rewrite would send it to a valid page to display user info so i would like to know how to say doesnt exist rather then empty fields in a page.
To be more flexible then strict 404.html follow my example.
In Global.asax.cs override:
For example my 404.aspx contains form to send feedback, 403.aspx – exposes more interesting items for user, and 500 sends alert to Admin.