2014-06-24 19:42:13 +04:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<configuration>
|
|
|
|
<system.webServer>
|
|
|
|
<rewrite>
|
|
|
|
<rules>
|
2014-06-30 16:16:33 +04:00
|
|
|
{% for directory in site.redirect_directories %}
|
|
|
|
<rule name="redirect-{{ directory.path | replace: '/', '-' }}" enabled="true">
|
|
|
|
<match url="^{{ directory.path }}/?$" />
|
2014-07-01 15:27:01 +04:00
|
|
|
<conditions logicalGrouping="MatchAll">
|
|
|
|
<add input="{REQUEST_FILENAME}.html" matchType="IsFile" negate="true" />
|
|
|
|
</conditions>
|
2014-06-30 16:16:33 +04:00
|
|
|
<action type="Redirect" url="{{ directory.url }}" redirectType="Found" />
|
|
|
|
</rule>
|
|
|
|
{% endfor %}
|
2014-06-26 15:23:06 +04:00
|
|
|
{% for page in site.redirect_pages %} {% for redirect in page.previous_url %}
|
2014-06-30 16:16:33 +04:00
|
|
|
<rule name="redirect-{{ redirect | remove_first: '/' | replace: '/', '-' }}" enabled="true" stopProcessing="true">
|
|
|
|
<match url="^{{ redirect | remove_first: '/' }}$" />
|
2014-06-26 15:23:06 +04:00
|
|
|
<action type="Redirect" url="{{ page.url | remove_first: '/' | replace: '.html', '' }}" />
|
|
|
|
</rule>
|
|
|
|
{% endfor %}{% endfor %}
|
2014-06-24 19:42:13 +04:00
|
|
|
<rule name="add_html_extension" enabled="true" stopProcessing="true">
|
|
|
|
<match url="(.*)" />
|
|
|
|
<conditions logicalGrouping="MatchAll">
|
|
|
|
<add input="{REQUEST_FILENAME}.html" matchType="IsFile" />
|
|
|
|
</conditions>
|
|
|
|
<action type="Rewrite" url="{R:1}.html" />
|
|
|
|
</rule>
|
|
|
|
</rules>
|
|
|
|
</rewrite>
|
|
|
|
<staticContent>
|
2014-07-11 13:06:52 +04:00
|
|
|
<remove fileExtension=".json" />
|
2014-06-24 19:42:13 +04:00
|
|
|
<mimeMap fileExtension=".json" mimeType="application/json" />
|
|
|
|
</staticContent>
|
|
|
|
</system.webServer>
|
|
|
|
</configuration>
|