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.
Then on the process I encountered a file named web.config
containing entries for example:
<action name="SomeName" stopProcessing="true">
<match url=".*" ignoreCase="true" />
<conditions>
<add input="{URL}" pattern="^some_regex^">
</conditions>
<action type="Rewrite" url="index.php?someaction={C:1}">
</action>
Or
<action name="SomeName" stopProcessing="true">
<match url=".*" ignoreCase="true" />
<conditions>
<add input="{URL}" pattern="^some_regex^">
</conditions>
<action type="Rewrite" url="index.php?someaction={R:1}">
</action>
So far I thought that an nginx mapping like that:
^some_regex^ index.php?someaction=$1;
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?
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}.