How can I create an http handler to redirect all traffic to HTML pages?
Posted
by
Eitan
on Stack Overflow
See other posts from Stack Overflow
or by Eitan
Published on 2012-03-05T08:48:10Z
Indexed on
2012/11/10
5:00 UTC
Read the original article
Hit count: 215
Our company would like to redirect all calls to html files on our server to a separate page. The html pages are NOT in an asp.net application.
In order to do this, I've been writing and IIS Handler in asp.net.
1) Is this possible to add an IIS handler to redirect static content that isn't served by any asp.net engine, i.e. stand alone files on the server?
2) If it is possible, how do I do this? I created an http handler in a class library. In the app.config I added the handler to the and sections. I added the DLL to the GAC, I changed the html mapping to my custom IIS dll and nothing works. Is there a tutorial or explanation from A to B on how to do this?
Thanks.
E
p.s. I'm using IIS 7.5
© Stack Overflow or respective owner