title: Capturing a Value in a Cookie using URL Rewrite for IIS7
body: <p>I need to write a URL Rewrite rule for my IIS 7.5 website that captures a value in a particular cookie, and then uses that value to construct a URL.  For instance, the incoming requests looks like this:</p>
  
  <pre><code>GET http://myserver.com/test.aspx HTTP/1.1
  Accept: text/html, application/xhtml+xml, */*
  Accept-Language: en-US
  User-Agent: Mozilla/5.0
  Host: myserver.com
  Cookie: foo=bar; bat=bar
  </code></pre>
  
  <p>I'd like to route them to this (based on the "foo" cookie value):</p>
  
  <pre><code>http://myserver.com/bar/test.aspx
  </code></pre>
  
  <p>fter reviewing the documentation and searching for examples, I'm stumped!  Thanks for your help.</p>