Forum Discussion

Alex-S-NZ's avatar
Alex-S-NZ
Copper Contributor
Sep 19, 2022

Can you create a SharePoint redirect site using the REDIRECTSITE#0 template?

If you accidentally deleted a redirect site that led from sharepoint.com/sites/old-url to sharepoint.com/site/new-url (that had the REDIRECT#0 template), is there any way to recreate the redirect site to put it back? 

 

It seems that the redirect sites do not show up in the SharePoint admin centre under "deleted sites". They also do not appear using PowerShell's Get-SPODeletedSite cmdlet.

 

Does anyone know if there is any way to recover or recreate the redirect site at all?

    • Alex-S-NZ's avatar
      Alex-S-NZ
      Copper Contributor

      This could be a solution - thanks for posting it! I'll let you know how I get on. Just out of curiosity will it redirect everything - or just links to the main page?

       

      For example - if a webpage was linking to sharepoint.com/site/oldsite/files/file1.jpg would this method forward the request to sharepoint.com/site/newsite/files/file1.jpg ? I guess I'm looking for the equivalent of a .htaccess rewrite rule or something which has the same features as the REDIRECT#0 template implementation.

  • Alex-S-NZ 

     

    Redirect site gets created as part of changing a SharePoint site address, moving a site to a different geo location, or swapping a site.

    If you perform any of above operation again, you should have it working back.