You can use this code for any asp.net application in the Global.asax file:
void Application_BeginRequest(object sender, EventArgs e)
{
string FromHomeURL = http:
string ToHomeURL = http:
if(HttpContext.Current.Request.Url.ToString().ToLower().Contains(FromHomeURL))
{
HttpContext.Current.Response.Status = "301 Moved Permanently";
HttpContext.Current.Response.AddHeader("Location",
Request.Url.ToString().ToLower().Replace(FromHomeURL, ToHomeURL));
}
}
, , . Google -. -www. /fooobar.com/...:)