URL Rewriting and Anonymous Access with SharePoint – Part One

22 Mar

There are many useful blogs focusing on URL Rewriting for SharePoint but none cover everything in one go and it can be quite hard to piece together all of the information. This series of posts will talk you through creating a web app from scratch, setting up an anonymous internet extension, setting up pretty URL’s and getting around any problems along the way. The URL’s that we will end up with wont have the pages library or the .aspx extension. Just as a note here, I am using IIS 7.5 and SharePoint 2010.


The site structure will determine how the re-writing will work, so this needs to be done before implementing anything. There are two scenario’s I want to cover for a fictional product company called Geeks In Suits to illustrate how different the rewriting can work. Geeks In Suits are based in two states, Washington and California. The products and services they sell in these two regions are quite different. They either want to put all of their information into one pages library in one site collection, or have two sub sites, one for each state as the sites will grow bigger in the future.

The way that URL rewriting works is we need to take the URL coming in and change that back to a URL that SharePoint can understand. This means adding the pages library back into the URL and the .aspx extension back onto the end of the requested page. Below are our two scenarios.

Example 1: One Site Collection

If one site collection is used we have to place the /pages/ back into the URL and we always know where this is going to go, just after the main address of the site. Everything in between are folders or and a file name so we can just add .aspx onto the end.


Example 2: A Site Collection with sub sites

If we decide to use the main site collection just as a parent to inherit from and use two sub sites to hold the content we add another layer to the URL.

For example if our URL is geeksinsuits.com/CA/Folder/page where do we add the pages library? Our rules will have to have some type of knowledge about our URL before it is rewritten.

In this post I am going to go over Example two, Waldek has already covered the rules needed for example one very well here.

Anonymous Access

Public facing sites need to be accessed by anonymous users, but the site also needs to be maintained by the content editors. There are a few different ways that you can allow people to log into the site for the content editing, using a login link, having a login page that only the editors know about, having somewhere to click etc. We are going to extend the web app so it will have an internet zone. This will allow us to have two IIS websites that will be accessed separately but are still essentially the same site. This will also fix our problem with editors logging in as there will be two urls that can access the site, one needing authentication and the other being fully anonymous.

Interesting? Yes? Go to the Next Post (Creating a web app with an internet extension and setting up anonymous access)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: