我有2个URL重写,从http到https,从非www到www。 当我从根目录或一个/路径访问网站时,此方法有效,但是当我具有/ cables / cable_usb之类的更多路径时,重定向不起作用:
<rule name="HTTP Redirect to HTTPS" enabled="true" stopProcessing="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
<rule name="Redirects to www.budget-hardware.nl" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^budget-hardware.nl$" />
</conditions>
<action type="Redirect" url="https://www.budget-hardware.nl/{R:0}" />
</rule>
当我去 http://budget-hardware.nl我将以https://www.budget-hardware.nl结尾 但是当我转到http://www.budget-hardware.nl/kabels_adapters/kabels_adaptersverloop时,它将停留在http不安全的站点。
谢谢