Redirecting the site collection
Question
I have a site collection with URL https://MySharepoint.Dev.com/default.aspx
.
I just want to know if some one browses to this it should redirect to https://MySharepoint.Dev.com
without default.aspx
page.
I have almost around 30 sitecollections like this. Is there any setting where we can just include like that?
Solution
I would use URL Rewrite module for this with pattern
(?:[^*]+)(?=\/default\.aspx)
In case you wish to get rid of /pages/ as well, use this for pattern
(?:[^*]+)(?=\/pages\/default\.aspx)
and Rewrite URL
{R:0}
It will tackle at least these scenarios
- http://mysp.com/sites/somesite/default.aspx
- https://mysp.com/default.aspx
- https://www.mysp.com/default.aspx?qsvalue=asdad
- https://www.mysp.com/sites/asdasd/default.aspx?qsvalue=asdad
Details on configuring URL Rewrite module can be found here.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange