title: Looking for a HTTPHandler to modify pages on the fly to point to a CDN
body: <p>What I'm trying to do is create (or perhaps one already exists) a HTTPHandler that will filter the HTML generated ASP.NET to use the content delivery network (CDN). For example, I want to rewrite references such as this:</p>
  
  <blockquote>
    <p>/Portals/_default/default.css</p>
  </blockquote>
  
  <p>to </p>
  
  <blockquote>
    <p><a href="http://cdn.example.com/Portals/_default/default.css" rel="noreferrer">http://cdn.example.com/Portals/_default/default.css</a></p>
  </blockquote>
  
  <p>I'm perfectly happy using RegEx to match the initial strings. Such a regex patterns might be:</p>
  
  <pre><code>href=['"](/Portals/.+\.css)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>src=['"](/Portals/.+\.(css|gif|jpg|jpeg))
  </code></pre>
  
  <p>This is a dotnetnuke site and I don't really have control over all the HTML generated so that's why I want to do it with an HTTPHandler. That way the changes can be done post-page generation.</p>