Answered by:
Is there a way to redirect the root of a SharePoint application to a sub-site?

Question
-
So, I have a customer with an application, lets call it https://customersite.sharepoint.stuff - then, the customer builds a sub-site called https://customersite.sharepoint.stuff/widget-a
In the future, they plan to build more sub-sites, like widget-b, widget-c, etc. but for right now, they have just the one sub-site. Until they get these other sub-sites built, however, the customer wants all traffic going to https://customersite.sharepoint.stuff/ to be redirected to https://customersite.sharepoint.stuff/widget-a/.
I tried setting an HTTP redirect in IIS, so that the root would get redirected to the sub-site, with the "Only redirect requests to content in this directory (not subdirectories)" checkbox ticked. With this enabled, if a user typed in https://customersite.sharepoint.stuff to their browser, it would correctly flip to https://customersite.sharepoint.stuff/widget-a. But if the user typed in https://customersite.sharepoint.stuff/widget-a it would get redirected to https://customersite.sharepoint.stuff/widget-a/widget-a and an error.
I think the problem is that the folder "widget-a" does not actually exist, according to what IIS understands. If I actually create that folder in the root of where the application exists, then the whole thing breaks and nothing can be reached.
I have read about using a redirect web part, but I wanted to see if there was some other solution.
Thursday, April 26, 2012 6:54 PM
Answers
-
Hi,
For this to work it is better to have SharePoint do the redirection and not IIS.
On the root site collection in SharePoint, create a redirect page to redirect to widget-a subsite. To create the redirect page you will need to:
A. access the root site collection. So if you previously did not create is, create it first
B. Enable publishing features ( Site Actions - Site Settings - Site Collection Features - Enterprise Publishing features)
activate SharePoint Server Publishing Infrastructure
Site Actions - Site Settings - Manage Site Features
activate SharePoint Server Publishing
C. Create the redirect page:
Go to the Pages document Library in the site collection
Create a new page - and select the redirect page layout
Edit the new page and specify the Redirect URL. Save the document and publish it.
D. Set the created page as the welcome page ( Site Actions - Site Settings - Look and Feel - Welcome Page)
Just a amall remark. Once in place if you access the site as a site collection administrator, you will see the redirect page for 5 seconds. This will not be the case for your normal users
Dirk Van den Berghe
- Edited by Dirk Van den Berghe Friday, April 27, 2012 9:09 AM
- Proposed as answer by Soumya B Monday, April 30, 2012 12:51 AM
- Marked as answer by Shimin Huang Friday, May 4, 2012 7:54 AM
Friday, April 27, 2012 8:59 AM
All replies
-
Hi,
I would have tried what you already tried.
Other solutions may involve other agencies of your organization. Did you talk to your network/ dns team if they can do a redirection. Or do you use any load balancer which can reroute such traffic for the time being.
If you have UAG security, I think an UAG administrator can also do a similar redirect. But that needs to be verified.
Thanks, Soumya | MCITP, SharePoint 2010
Thursday, April 26, 2012 8:25 PM -
Hi,
For this to work it is better to have SharePoint do the redirection and not IIS.
On the root site collection in SharePoint, create a redirect page to redirect to widget-a subsite. To create the redirect page you will need to:
A. access the root site collection. So if you previously did not create is, create it first
B. Enable publishing features ( Site Actions - Site Settings - Site Collection Features - Enterprise Publishing features)
activate SharePoint Server Publishing Infrastructure
Site Actions - Site Settings - Manage Site Features
activate SharePoint Server Publishing
C. Create the redirect page:
Go to the Pages document Library in the site collection
Create a new page - and select the redirect page layout
Edit the new page and specify the Redirect URL. Save the document and publish it.
D. Set the created page as the welcome page ( Site Actions - Site Settings - Look and Feel - Welcome Page)
Just a amall remark. Once in place if you access the site as a site collection administrator, you will see the redirect page for 5 seconds. This will not be the case for your normal users
Dirk Van den Berghe
- Edited by Dirk Van den Berghe Friday, April 27, 2012 9:09 AM
- Proposed as answer by Soumya B Monday, April 30, 2012 12:51 AM
- Marked as answer by Shimin Huang Friday, May 4, 2012 7:54 AM
Friday, April 27, 2012 8:59 AM -
Thank you - Very helpfulWednesday, May 21, 2014 5:40 AM