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".

  • did you change site collections url or sub--site? and what about the old url, are they exist anymore? – Waqas Sarwar MVP Apr 30 '15 at 19:26
  • Old url does not exist anymore. All changes were sub-sites. – BlueBird Apr 30 '15 at 19:56
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.