Hi, Suppose if an external webpage is pointing to one of the webpages of my website which does not exist and I want to re-direct, all such requests to my home page. what should I do for that... suppose if a website www.xyz.com is pointing to my webpage www.abc.com/test.aspx which does not exist anymore , now all i want is that, I want to re-direct all such requests to the home page of my website. Please help and give me a detailed response. Thanks!
This is one of the way you can do this. <script runat="server"> private void Page_Load(object sender, System.EventArgs e) { Response.Status = "301 Moved Permanently"; Response.AddHeader("Location","http://www.home-page-url.com"); } </script> But you page should exist for this. However, you may do it in alternative way as mentioned in the URL given below. http://www.wrox.com/WileyCDA/Sectio...tus-Codes-with-ASP-NET-and-IIS.id-306460.html