How do you do a 301 redirect with ASP.NET?

1 replies
I need to rename some of my pages. So, for SEO purposes, I need to do a 301 redirect to the new page. How is that done when using ASP.NET?

Thanks!

Johnny
#301 #aspnet #redirect
  • Profile picture of the author rwil02
    The standard Response.Redirect won't do it.

    Something like
    Code:
    Response.ClearContent()
    Response.ClearHeaders()
    Response.StatusCode = 301
    Response.StatusDescription = "Moved Permanently"
    Response.AppendHeader("Location", "http://www.example.com/")
    Should do the trick.
    Signature

    Roger Willcocks
    L-Space Design
    Please vote to help me win a 3kW solar array

    {{ DiscussionBoard.errors[129124].message }}

Trending Topics