Bilginin Adresi Homepage
Forum Home Forum Home > Webmaster > Webmaster Genel
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

REKLAM ALANI

El dokuma Konya Kilim, Kayseri Kilim, Antik Milas Halı, Antik Yörük Kilim, Hint Kilim

Konya Kilimleri Kayseri Kimleri Yörük İran ve Antika Kilimler Hint Kilimleri

Yeni ve 2. El İnşaat Yapı Malzemeleri

Masa iskele, Beton Paspayı, Kalıpaltı iskele, Güvenlikli iskele

Fayer İnşaat Ergenekon İnşaat


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

 Post Reply Post Reply
Author
Message
invertor View Drop Down
Security Professional
Security Professional
Avatar
İnventor

Joined: 18-01-2008
Status: Offline
Points: 3332
Post Options Post Options   Thanks (0) Thanks(0)   Quote invertor Quote  Post ReplyReply Direct Link To This Post Topic: https ve 404 hata sayfasına yönlendirme web.config
    Posted: 03-02-2015 at 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>




Edited by invertor - 10-02-2015 at 23:30
Back to Top
invertor View Drop Down
Security Professional
Security Professional
Avatar
İnventor

Joined: 18-01-2008
Status: Offline
Points: 3332
Post Options Post Options   Thanks (0) Thanks(0)   Quote invertor Quote  Post ReplyReply Direct Link To This Post Posted: 03-02-2015 at 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>




Edited by invertor - 03-02-2015 at 18:09
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.