1

I have a series of spweb sites created, due to a change in our source system we changed the URLs of all these sites to match our source system. Unfortunately all the emails that people have, have links that point to the old URLs.

Is there a way to create mappings for these old URLs? If so can it be done programatically since there are quite a few of them?

Here is an example:

OLD URL: http://sharepoint.company.com/site/12345

NEW URL: http://sharepoint.company.com/site/L12345

All of the changes follow this same scheme of simply inserting an "L" in front of the new URL. Unfortunately this does not apply to every single site in the collection, some remained unchanged and do not have the "L".

BlueBird
  • 1,850
  • 3
  • 17
  • 28

1 Answers1

0

their is a solution but that required the subsite on existing url.

Following are the steps which will help us in redirecting any level of site in SharePoint in a pretty neat manner. We will try to redirect http://mosssps/sites/Team/default.aspx to http://mosssps

  1. We will open the site in Web Folder view
  2. Download default.aspx page of the site which we want to redirect. There are other ways to access default.aspx page too.
  3. Open the default.aspx in notepad and delete all the contents of it
  4. Add the following code to it

    <%@ Page language="C#" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
    
    <script>
     window.location.href = "http://mosssps/Pages/Default.aspx";
    
    </script>
    
  5. http://mosssps/Pages/Default.aspx is the URL where we want it to redirect if browse to http://mosssps/sites/Team/default.aspx

  6. Upload the Default.aspx and now when you browse to http://mosssps/sites/Team/default.aspx it will redirect to http://mosssps/Pages/Default.aspx.

You have to test it first.

http://blogs.technet.com/b/harmeetw/archive/2009/09/08/redirecting-a-sharepoint-subsite-or-a-site-collection-to-a-different-url.aspx

Waqas Sarwar MVP
  • 57,008
  • 17
  • 43
  • 79
  • Unfortunately this doesn't appear as though it will work for any subURLs within the site. Say for example if the user goes directly to: http://mosssps/sites/Team/DocLibrary/default.aspx or http://mosssps/sites/Team/DocLibrary/document.pdf – BlueBird Apr 30 '15 at 20:22
  • it will put redirection on default.aspx page and you have to edit all the pages. but for the document i.e .pdf or .docx etc, i think that is not possible. – Waqas Sarwar MVP Apr 30 '15 at 20:24