Wednesday, March 26, 2014

Short URLs for SharePoint using HTTP Redirect in IIS 7

A quick and easy way to create a short URL for a SharePoint location is to use the HTTP Redirect module in IIS 7.

1) Open IIS Manager.

2) Expand the Site where you want to add the short URL. You will see the virtual directories.

3) Right-click on the Site and select to Add Virtual Directory. Type in an Alias to be used as the URL suffix. For example, if your root Site URL is http://teamsites and you use an Alias of "forms", the short URL will be http://teamsites/forms. For the physical path, I recommend browsing to the C:\inetpub\wwwroot\wss\VirtualDirectories directory and creating a new folder there with the same name as the Alias. DO NOT create the new folder under the same directory as the root Site (e.g. C:\inetpub\wwwroot\wss\VirtualDirectories\teamsites). This will cause the root site to be redirected as well. Select OK to create the new virtual directory.











4) Select the new virtual directory under the Site. In the Features View, double-click the HTTP Redirect icon.

5) Check to Redirect requests to this destination, and enter the long URL. For the Redirect Behavior section, only select to Redirect all requests to exact destination (instead of relative to destination). Leave the Status code as is and click Apply in the Actions pane on the right.












Perform all steps on every WFE in your farm.

When done, upon browsing to the short URL you will be automatically redirected to the long URL.

2 comments:

  1. Thanks for sharing this useful info. You can make your site secure with HTTPS (Hypertext Transport Protocol Secure), which protects the integrity and confidentiality of your users' data.

    ReplyDelete
  2. Did you know you can create short urls with AdFly and get money from every click on your short urls.

    ReplyDelete