title: Difference between {R:1} and {C:1} on iis web.config file
body: <p>ON my job I was asked to migrate a php application running on iis/azure into running via nginx and fpm over a GNU+Linux machine.</p>
  
  <p>Then on the process I encountered a file named <code>web.config</code> containing entries for example:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;action name="SomeName" stopProcessing="true"&gt;
     &lt;match url=".*" ignoreCase="true" /&gt;
     &lt;conditions&gt;
        &lt;add input="{URL}" pattern="^some_regex^"&gt;
     &lt;/conditions&gt;
     &lt;action type="Rewrite" url="index.php?someaction={C:1}"&gt;
  &lt;/action&gt;
  </code></pre>
  
  <p>Or</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;action name="SomeName" stopProcessing="true"&gt;
     &lt;match url=".*" ignoreCase="true" /&gt;
     &lt;conditions&gt;
        &lt;add input="{URL}" pattern="^some_regex^"&gt;
     &lt;/conditions&gt;
     &lt;action type="Rewrite" url="index.php?someaction={R:1}"&gt;
  &lt;/action&gt;
  </code></pre>
  
  <p>So far I thought that an nginx mapping like that:</p>
  
  <pre><code>^some_regex^ index.php?someaction=$1;
  </code></pre>
  
  <p>Would do the job in both actions (somehow). But I still cannot understand the difference between {C:1} and {R:1} on regex maches I understand that in my nginx would be something like $1 (a subregex match) but what different to the web.config is {C:1} and {R:1} entries?</p>
  
  <p>I am asking because I may need to change the nginx's subregex matches a bit regarding if the match is {C:1} or {R:1}.</p>