Techbubbles

Permanently Redirecting a Page in ASP.NET 4.0

Web applications commonly move the pages and content around the servers. This results to accumulation of old links in search engines.

Traditionally this was handled in ASP.NET using the Response.Redirect method to forward the request to the new URL. However Redirect method issues an HTTP 302 found (temporary redirect) response. Redirect method results in extra round trip when user accessing the old URLs.

                                                                                        image-thumb

 

ASP.NET 4.0 adds a new RedirectPermanent helper method that makes it easy to issue 301 responses [Moved Permanently Responses].

RedirectPermanent("/temp/live.aspx");

Advantage: Now search engines can recognise the new URLs that associated with the content which eliminates the unnecessary round trip made by the browser for temp redirects

Share this post :


Related Posts:

  • No Related Posts
%d bloggers like this: