title: Use IIS Outbound Rewrites in C# or VB.net
body: <p>Using IIS URL Rewrite one can rewrite URLs at response time in IIS. I want to be able to do this from codebehind so that I can save a file with rewritten URLs (such as sitemap.xml). Is this possible in VB/C#? I can't seem to find any built in way to do this.</p>
  
  <p>Alternatively, is there any way with Outbound rules through IIS to ReWrite URLs that are inside the innerHTML of a specific html item, and not an attribute?</p>
  
  <p>I've started to write my own .NET class to do this (load rewrites from web.config on class instantiation, the call a function passing the unwritten URL to receive back a rewritten one), but while the basic solution to get simpler rewrites working is quite trivial, the complete solution doesn't seem to be trivial at all.</p>