<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="RedirectUserFriendlyURL1" stopProcessing="true"> <match url="^index\.asp$" /> <conditions> <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> <add input="{QUERY_STRING}" pattern="^vt=([^=&]+)&cat_id=([^=&]+)$" /> </conditions> <action type="Redirect" url="{C:1}/{C:2}" appendQueryString="false" /> </rule> <rule name="RewriteUserFriendlyURL1" stopProcessing="true"> <match url="^([^/]+)/([^/]+)/?$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.asp?vt={R:1}&cat_id={R:2}" /> </rule> <rule name="RedirectUserFriendlyURL2" stopProcessing="true"> <match url="^showlog\.asp$" /> <conditions> <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> <add input="{QUERY_STRING}" pattern="^cat_id=([^=&]+)&log_id=([^=&]+)$" /> </conditions> <action type="Redirect" url="showlog/{C:1}/{C:2}.html" appendQueryString="false" /> </rule> <rule name="RewriteUserFriendlyURL2" stopProcessing="true"> <match url="^showlog/([^/]+)/([^/]+)\.html" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="showlog.asp?cat_id={R:1}&log_id={R:2}" /> </rule> <rule name="RedirectUserFriendlyURL3" enabled="true" stopProcessing="true"> <match url="^index\.asp$" /> <conditions> <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> <add input="{QUERY_STRING}" pattern="^vt=([^=&]+)&l_year=([^=&]+)$" /> </conditions> <action type="Redirect" url="year/{C:1}/{C:2}" appendQueryString="false" /> </rule> <rule name="RewriteUserFriendlyURL3" enabled="true" stopProcessing="true"> <match url="^year/([^/]+)/([^/]+)/?$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.asp?vt={R:1}&l_year={R:2}" /> </rule> <rule name="RedirectUserFriendlyURL4" enabled="true" stopProcessing="true"> <match url="^index\.asp$" /> <conditions> <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> <add input="{QUERY_STRING}" pattern="^vt=([^=&]+)&page=([^=&]+)$" /> </conditions> <action type="Redirect" url="page/{C:1}/{C:2}" appendQueryString="false" /> </rule> <rule name="RewriteUserFriendlyURL4" enabled="true" stopProcessing="true"> <match url="^page/([^/]+)/([^/]+)/?$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.asp?vt={R:1}&page={R:2}" /> </rule> <rule name="RedirectUserFriendlyURL5" enabled="true" stopProcessing="true"> <match url="^index\.asp$" /> <conditions> <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> <add input="{QUERY_STRING}" pattern="^vt=([^=&]+)&cat_id=([^=&]+)&page=([^=&]+)$" /> </conditions> <action type="Redirect" url="{C:1}/{C:2}/{C:3}" appendQueryString="false" /> </rule> <rule name="RewriteUserFriendlyURL5" enabled="true" stopProcessing="true"> <match url="^([^/]+)/([^/]+)/([^/]+)/?$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.asp?vt={R:1}&cat_id={R:2}&page={R:3}" /> </rule> <rule name="redirect to HTTPS" enabled="true" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" /> </rule> </rules> <outboundRules> <rule name="OutboundRewriteUserFriendlyURL1" preCondition="ResponseIsHtml1"> <match filterByTags="A, Form, Img" pattern="^(.*/)index\.asp\?vt=([^=&]+)&(?:amp;)?cat_id=([^=&]+)$" /> <action type="Rewrite" value="{R:1}{R:2}/{R:3}/" /> </rule> <rule name="OutboundRewriteUserFriendlyURL2" preCondition="ResponseIsHtml1"> <match filterByTags="A, Form" pattern="^(.*/)showlog\.asp\?cat_id=([^=&]+)&(?:amp;)?log_id=([^=&]+)$" /> <action type="Rewrite" value="{R:1}showlog/{R:2}/{R:3}.html" /> </rule> <rule name="OutboundRewriteUserFriendlyURL6" preCondition="ResponseIsHtml1"> <match filterByTags="A, Form" pattern="^(.*/)showlog\.asp\?log_id=([^=&]+)$" /> <action type="Rewrite" value="{R:1}showlog/0/{R:2}.html" /> </rule> <rule name="OutboundRewriteUserFriendlyURL3" preCondition="ResponseIsHtml1"> <match filterByTags="A, Form, Img" pattern="^(.*/)index\.asp\?vt=([^=&]+)&(?:amp;)?l_year=([^=&]+)$" /> <action type="Rewrite" value="{R:1}/year/{R:2}/{R:3}/" /> </rule> <rule name="OutboundRewriteUserFriendlyURL4" preCondition="ResponseIsHtml1"> <match filterByTags="A, Form, Img" pattern="^(.*/)index\.asp\?vt=([^=&]+)&(?:amp;)?page=([^=&]+)$" /> <action type="Rewrite" value="https://blog.cnbruce.com/page/{R:2}/{R:3}/" /> </rule> <rule name="OutboundRewriteUserFriendlyURL5" preCondition="ResponseIsHtml1"> <match filterByTags="A, Form, Img" pattern="^(.*/)index\.asp\?vt=([^=&]+)&(?:amp;)?cat_id=([^=&]+)&(?:amp;)?page=([^=&]+)$" /> <action type="Rewrite" value="{R:1}{R:2}/{R:3}/{R:4}/" /> </rule> <rule name="Add Strict-Transport-Security when HTTPS" enabled="true"> <match serverVariable="RESPONSE_Strict_Transport_Security" pattern=".*" /> <conditions> <add input="{HTTPS}" pattern="on" ignoreCase="true" /> </conditions> <action type="Rewrite" value="max-age=31536000" /> </rule> <preConditions> <preCondition name="ResponseIsHtml1"> <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /> </preCondition> </preConditions> </outboundRules> </rewrite> <httpErrors errorMode="Custom"> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" prefixLanguageFilePath="" path="/404.html" responseMode="ExecuteURL" /> </httpErrors> </system.webServer>
</configuration>
|