Author: pkrishnan | Posted on: 3/16/2009 4:17:51 AM | Views : 236

How can I 301 redirect www.example.com/default.aspx to www.example.com
without using ISAPI filters?

I am using the following code

If (HttpContext.Current.Request.Url.AbsolutePath.ToLower = "/default.aspx") Then
HttpContext.Current.Response.Status = "301 Moved Permanently"
HttpContext.Current.Response.AddHeader("Location","http://www.example.com")
End If

But it makes infinite redirect loop. ...

Go to the complete details ...