IIS 7 URL Rewrite to mix anonymous and secure SharePoint content
January 25, 2012 in Uncategorized
This is a quick follow up to Chris’ SharePoint blog post http://blogs.visigo.com/chriscoulson/mixed-anonymous-and-secure-content-with-sharepoint-2010/ with an IIS trick learned from Foreignkid at http://blog.foreignkid.net/2011/11/iis-7-url-rewrite-http-redirect-to-root-site/
Summary
Blending anonymous and authenticated users on a single site can be challenging. Enable anonymous read on all site content is generally not appropriate. Anonymous users should only be granted a bare minimum set of permissions. Enabling read on the “Site Pages” library works well to enable homepage viewing. However, the challenge with this approach is that anonymous users then cannot “see” the root site (/) in order to be properly redirected with HTTP 302 (/SitePages/Home.aspx) to the homepage.
I recommend leveraging IIS 7 URL Rewrite to handle this direct at the IIS tier before SharePoint sees the HTTP request. This way all root site (/) requests are correctly sent to the homepage – for both anonymous and authenticated users.
Action Steps
- Allow Anonymous on the Web Application
- Create root site collection (/)
- Enable Welcome homepage
- Enable Anonymous Access on “Lists and Libraries” under Site Settings
- Grant “View Items” permission on the Site Pages library
- Install IIS 7 URL Rewrite .MSI
- Create a new rule with Regular Expression (^$) and 302 Redirection (SitePages/Home.aspx)
Screenshots
Allow Anonymous on the Web Application ![]()
Create root site collection (/) ![]()
Enable Anonymous Access for “Lists and Libraries” under Site Settings ![]()
Grant “View Items” permission on the Site Pages library ![]()
Install IIS 7 URL Rewrite .MSI
Download MSI from http://www.iis.net/download/urlrewrite and install on all web front ends (WFE)
Create a new rule with Regular Expression (^$) and 302 Redirection (SitePages/Home.aspx)
Hope that helps!

Recent Comments