title: IIS ReWrite catch .jpg?w=960&h=980
body: <p>I have created IIS Outbound Rules to rewrite to CDN. Example for .mov files</p>
  <pre><code>&lt;rule name=&quot;CDN-01-mov&quot; preCondition=&quot;CheckHTML&quot; stopProcessing=&quot;true&quot;&gt;
  &lt;match filterByTags=&quot;Img, CustomTags&quot; customTags=&quot;src&quot; pattern=&quot;http(s)?://www.(example.com)(/public)(/uploads)(.*\.mov)&quot; /&gt;
  &lt;action type=&quot;Rewrite&quot; value=&quot;https://cdn.example.com/public/uploads{R:5}&quot; /&gt;
  &lt;/rule&gt;
  </code></pre>
  <p>However, I would also like to catch .jpg files. The problem is that the  tags with .jpg files in my application are like this:</p>
  <p>files/storage/327/9071615039504vishbjwcgbftdy2my1p6.jpg?w=960&amp;h=980</p>
  <p>so it has the ?w=960&amp;h=980 part which I don't know how to catch with regex.</p>
  <p>How could I make a regex rule to catch .jpg[anything] ?</p>
  <p>Thanks
  Alex</p>