Hi,
I am trying to setup a custom 404 handler page. So there are two webservers, one hosting the content (ContentServer) and the other hosting the custom-404-handler page (AppServer).
Once a user tries to access a page that does not exist on the contentserver, I want the IIS to redirect the user to a page (custom-404-hander) on AppServer.
On the custom-404-hander page I would like to check the original url and display message based on the original url.
My problem:
1. for .aspx pages, I can get the application path part of the orignal url instead of the whole web address, but I want the complete original url
so if original url was....http://media.contentserver.com/thunderwatch/page1.aspx on the AppServer I am getting only /thunderwatch/page1.aspx, how can I get the full url.
2. for .asp, .html or files of other extensions I'm not getting any thing of the orignial url. Although the page is redirected to Appserver/custom-404-hander but I don't have the original URL. I checked Request.QueryString and ServerVariable["QUERY_STRING"] too but there is nothing.
How can I get the full orignial URL.
Thanks for your help.