Stačí do WebConfigu doplnit rewrite pravidlo do části System.Webserver
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
Zdroj:
https://napoveda.czechia.com/clanek/presmerovani-http-na-https/
Žádné komentáře:
Okomentovat