Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Handling redirects for old links View modes: 
User avatar
Member
Member
forthewinyo - 3/23/2009 12:15:08 PM
   
Handling redirects for old links
After recreating an existing site using Kentico there are now a number of dead links in the search engines pointing to where the files used to be located, the links are mainly to files with extensions like ".asp, .pdf".

I need to create permanent redirects for these old links to preserve link equity, and I want to avoid creating the redirects in IIS.

What is the best way to handle this?

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 3/26/2009 10:03:50 AM
   
RE:Handling redirects for old links
Hello,

You can check current URL and eventually make redirection in Application_BeginRequest method in ~\App_Code\Global.asax.cs file using sample code bellow:

Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","targetUrl");

Best Regards,

Martin Dobsicek