Как я могу преобразовать эти правила перезаписи IIS в правила перезаписи Nginx?

#xml #nginx #url-rewriting

#xml #nginx #url-перезапись

Вопрос:

Как я могу преобразовать эти правила перезаписи IIS в правила перезаписи nginx? Я попробовал конвертер, но, похоже, он не работает, и я не очень хорошо знаком с Nginx. Я использовал это: https://github.com/ismai1/iis-to-nginx

 <rule name="Changes URL" stopProcessing="false">
    <match url="^changes/([^/] )/([^/] )/?$" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="changes?year={R:1}amp;amp;month={R:2}" />
</rule>
<rule name="CMS URL" stopProcessing="false">
    <match url="^content/view/([^/] )/?$" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="content/view?id={R:1}" />
</rule>
<rule name="CMS Page URL" stopProcessing="false">
    <match url="^content/view/([^/] )/([^/] )/?$" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="content/view?id={R:1}amp;amp;cpage={R:2}" />
</rule>
<rule name="CMS Permissions URL" stopProcessing="false">
    <match url="^content/permissions/([^/] )/?$" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="content/permissions?id={R:1}" />
</rule>
<rule name="MainPages" stopProcessing="false">
    <match url="^([^/] )/?$" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.php?page={R:1}" />
</rule>
<rule name="SubPages" stopProcessing="false">
    <match url="^([^/] )/([^/] )/?$" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.php?page={R:1}amp;amp;spage={R:2}" />
</rule>
<rule name="Map Image Redirect 2" stopProcessing="true">
    <match url="^ingame/getmap_image/([^/] ).jpg/?$" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="ingame/getmap_image.php?map={R:1}" />
</rule>
<rule name="Map Image Redirect" stopProcessing="true">
    <match url="^ingame/getmap_image/large/([^/] ).jpg/?$" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="ingame/getmap_image.php?map={R:1}amp;amp;large=1" />
</rule>