Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 09-22-2008, 12:16 PM   #1
John Palmieri, Copywriter
War Room Member
 
Johnny12345's Avatar
 
Join Date: Oct 2007
Location: USA
Posts: 762
Thanks: 126
Thanked 104 Times in 84 Posts
Default How do you do a 301 redirect with ASP.NET?

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
Johnny12345 is online now   Reply With Quote
Old 09-24-2008, 11:15 PM   #2
HyperActive Warrior
War Room Member
 
rwil02's Avatar
 
Join Date: May 2005
Location: Auckland, New Zealand.
Posts: 241
Thanks: 0
Thanked 13 Times in 12 Posts
Social Networking View Member's Twitter Profile 
Default Re: How do you do a 301 redirect with ASP.NET?

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.

rwil02 is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
301, aspnet, redirect

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 12:34 AM.