Bilginin Adresi Ana Sayfa
Forum Anasayfası Forum Anasayfası > Webmaster > Webmaster Genel
  Aktif Konular Aktif Konular RSS - https ve 404 hata sayfasýna yönlendirme web.config
  SSS SSS  Forumu Ara   Events   Kayıt Ol Kayıt Ol  GiriÅŸ GiriÅŸ

https ve 404 hata sayfasýna yönlendirme web.config

 Yanıt Yaz Yanıt Yaz
Yazar
Mesaj Tersinden sırala
invertor Açılır Kutu Gör
Security Professional
Security Professional
Simge
Ýnventor

Kayıt Tarihi: 18-01-2008
Status: Aktif DeÄŸil
Points: 3365
Mesaj Seçenekleri Mesaj Seçenekleri   Thanks (0) Thanks(0)   Alıntı invertor Alıntı  Yanıt YazCevapla Mesajın Direkt Linki Konu: https ve 404 hata sayfasýna yönlendirme web.config
    Gönderim Zamanı: 03-02-2015 Saat 17:48
  Domain'e özel  ip adresi ile giriþ yapýldýðýnda  Domaine yönlendirme




<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="IP Hit" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="192.168.0.3" />
                    </conditions>
                    <action type="Redirect" url="http://www.example.com/{R:1}" redirectType="Permanent" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>




Düzenleyen invertor - 03-02-2015 Saat 18:09
Yukarı Dön
invertor Açılır Kutu Gör
Security Professional
Security Professional
Simge
Ýnventor

Kayıt Tarihi: 18-01-2008
Status: Aktif DeÄŸil
Points: 3365
Mesaj Seçenekleri Mesaj Seçenekleri   Thanks (0) Thanks(0)   Alıntı invertor Alıntı  Yanıt YazCevapla Mesajın Direkt Linki Gönderim Zamanı: 03-02-2015 Saat 00:45
Url yi  web config dosyasý ile https ve 404 hata sayfasýna yönlendirme

IIS 7.5'te SLS sertifikasý kullanýlarak   test edilmiþtir.



Html linkleri https linkine çevirir ve 404 Url  Rewrite yönlendirme hata sayfasýnýzý aktif eder.


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="index.html" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />
            </files>
        </defaultDocument>
       <httpErrors errorMode="Custom">
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" path="/404.asp" responseMode="ExecuteURL" />
            <remove statusCode="403" subStatusCode="4" />
        </httpErrors>
        <rewrite>
            <rules>
                <rule name="RedirectToHTTPS" enabled="true" stopProcessing="true">
                    <match url="(.*)" />
                        <conditions>
                            <add input="{HTTPS}" pattern="^OFF$" />
                        </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>





Sadece Http linkleri Https ye çevirir.




<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="index.html" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />
            </files>
        </defaultDocument>
        <httpErrors>
            <remove statusCode="403" subStatusCode="4" />
        </httpErrors>
        <rewrite>
            <rules>
                <rule name="RedirectToHTTPS" enabled="true" stopProcessing="true">
                    <match url="(.*)" />
                        <conditions>
                            <add input="{HTTPS}" pattern="^OFF$" />
                        </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>





Sadece 404 Url  Rewrite yönlendirme hata sayfasýnýzý aktif eder.



<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Custom">
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" path="/404.asp" responseMode="ExecuteURL" />
        </httpErrors>
    </system.webServer>
</configuration>




Sayfada bulunan hata kodlarýný  ve  404 Url  Rewrite özel  yönlendirme hata sayfasýnýzý aktif eder.



<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <rewrite>
            <rules>
                <rule name="OldStyle404" stopProcessing="true">
                    <match url=".*" />
                    <action type="Rewrite" url="/404.asp?404;http://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>




Alternatif



<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
</httpErrors>
<directoryBrowse enabled="true" />
</system.webServer>
</configuration>




Düzenleyen invertor - 10-02-2015 Saat 23:30
Yukarı Dön
 Yanıt Yaz Yanıt Yaz

Forum Atla Forum İzinleri Açılır Kutu Gör



Bu Sayfa 0.191 Saniyede Yüklendi.