Support

Great Ideas Start Here

blog: a regularly updated web page, typically run by an individual or organization, containing relevant thoughts and ideas.
 
by: Christine Swartzendruber, Chief Technology Officer

URL Rewriting is the process of creating links for a web site that are user friendly and intuitive for visitors. For example, if you’re writing .Net web forms, you may have a page on your site that looks like this…

http://www.yoursite.com/frmMyContentPageTemplate.aspx?SiteID=2&PageID=5&SectionID=12

Users won’t have any idea where that will take them. The solution is to create a clear path URL, that users will recognize. The link above can be rewritten to indicate what type of content a user will find when they access the page. http://www.yoursite.com/AboutUs


There are many posts online for performing URL Rewriting, but we had a difficult time finding something that would work with a .Net web site. After some brain-storming, we decided the best way to accomplish this would be to remotely access our sites using IIS manager. Performing URL Rewrites In IIS Remote Server Manager is the easiest way to automate the configuration of RegEx paths in your web.config file. Here’s how…

  • Select your site.
  • Select URL Rewrite from the IIS Section of the Management Tool
  • Select “View Rewrite Maps” from the right side menu
  • Select “Add Rewrite Map” from the right side menu
  • When prompted, give the Rewrite Map an intuitive name (ie: “mainNav map”)
  • Select “Add Mapping Entry” from the right side menu
  • Enter the “Original Value”… this is the rewrite value (ie: “/home”)
  • Enter the “New Value”… this is the actual link (ie: “frmContentPrimary.aspx?NavID=1”)
  • After you have entered all the links into your Rewrite Map select “Back To Rules”
  • Select “Add Rules” from the right side menu
  • Select the Rule Template, “Rule with rewrite map.”
  • Select the Rule Action, “Rewrite”
  • Select the Rewrite Map you want to use for this rule.
  • Click Ok, and you have completed the URL Rewriting Process.