, , .
web.config:
<system.webServer>
<rewrite>
<rules>
<clear />
</rules>
</rewrite>
web.release.config transfrom ( ):
<system.webServer>
<rewrite >
<rules xdt:Transform="Replace">
<clear/>
<rule name="Redirect to https" stopProcessing="true" >
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
</rule>
</rules>
</rewrite>
:
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="Redirect to https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
</rule>
</rules>
</rewrite>
LOT , , ...
In my case, I do not want to rewrite the rules in my database, but I added a comment to tell other developers to look in the transformations for more information, but I do not want this comment in the final version.
source
share