There can be some cases we may need to redirect some page or even home to another site or site collection (sub site may be). I observed that some developers trying from AAM or IIS but here I show easiest ways.

There can be multiple ways to active this task.

Easiest way using Js.

window.location = "http://new-site/";
  • Take a copy of page (you want redirect)
  • remove all content
  • Add only redirection code:<%@ Page language=”C#” Inherits=”Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c” %>window.location.href = “http://new-site/“;

Another option:

simple add Js in Page:

window.location.href = “http://new-site/“;
Another way to change in meta data of Master page:

  • Go to mater page
  • Add <meta http-equiv=“Refresh” content=“1; url=http://new-site/”>

Thanks!!

 

Leave a Reply

Your email address will not be published. Required fields are marked *