Türk Bayrağı
Teknik Not
.NET Framework 1 dk okuma

HTTP to HTTPS Redirect web.config

Web sitesini HTTP'den HTTPS'ye otomatik yönlendirmek için, web.config dosyasına aşağıdaki kodu eklememiz yeterli olucaktır. <configuration> <system.webServer> <rewrite> <rules> <rule name="HTTP to HTTPS redirect" stopPro...

Web sitesini HTTP'den HTTPS'ye otomatik yönlendirmek için, web.config dosyasına aşağıdaki kodu eklememiz yeterli olucaktır.

<configuration>
<system.webServer>
<rewrite>
    <rules>
       <rule name="HTTP to HTTPS redirect" stopProcessing="true"> 
         <match url="(.*)" /> 
         <conditions> 
           <add input="{HTTPS}" pattern="off" ignoreCase="true" />
         </conditions> 
         <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
       </rule> 
    </rules>
</rewrite>
</system.webServer>
</configuration>