Sep 19 2022 04:55 PM
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?
Sep 19 2022 06:47 PM
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.
Sep 20 2022 12:59 AM
@Alex-S-NZ would this work for you?
No-code modern SharePoint site redirect - M365 Dev Blog (m365-dev.com)
Sep 20 2022 06:06 AM - edited Sep 20 2022 06:14 AM
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.
Sep 20 2022 06:55 AM
Did you try swapping the site one more time?
Sep 23 2022 08:51 PM