This commit is contained in:
PROGRESS\kerpecheva 2020-06-04 11:33:19 +03:00
Родитель bd0a9cd144
Коммит 86b2643155
1 изменённых файлов: 32 добавлений и 18 удалений

Просмотреть файл

@ -66,16 +66,6 @@
<rewrite>
<rules>
<clear />
{% for directory in site.redirect_directories %}
<rule name="redirect-{{ directory.path | replace: '/', '-' }}" enabled="true">
<match url="^{{ directory.path }}/?$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}.html" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" url="{{ directory.url }}" redirectType="Found" />
</rule>
{% endfor %}
{% for page in site.redirect_pages %} {% for redirect in page.previous_url %}
<rule name="redirect-{{ redirect | remove_first: '/' | replace: '/', '-' }}" enabled="true" stopProcessing="true">
<match url="^{{ redirect | remove_first: '/' }}$" />
@ -84,14 +74,38 @@
{% endfor %}{% endfor %}
<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>
<!-- Start Manually Added Redirects -->
<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>
<rule name="Convert to lower case" enabled="true">
<match url="^([^?]*[A-Z][^?]*)(\?.*)?" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="\.png|\.css|\.jpg|\.gif" negate="true" />
</conditions>
<action type="Redirect" url="{ToLower:{R:1}}{R:2}" redirectType="Permanent" />
</rule>
<rule name="Hide .html ext" enabled="true">
<match ignoreCase="true" url="^(.*)"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" pattern="\.png|\.css|\.jpg|\.gif" negate="true" />
<add input="{REQUEST_FILENAME}.html" matchType="IsFile"/>
</conditions>
<action type="Rewrite" url="{ToLower:{R:0}.html}"/>
</rule>
<rule name="Redirecting .html ext" enabled="true">
<match url="^(.*)[.]html$"/>
<conditions logicalGrouping="MatchAny">
<add input="{URL}" pattern="(.*)[.]html$"/>
</conditions>
<action type="Redirect" url="{ToLower:{R:1}}"/>
</rule>
<!-- Start Manually Added Redirects -->
<rule name="redirect-installation-steps-uwp" enabled="true" stopProcessing="true">
<match url="installation-and-deployment/uwp/installationsteps-uwp" />
<action type="Redirect" url="../devtools/universal-windows-platform/installation-and-deployment/installationsteps" />