• 26-04-2017, 19:33:31
    #1
    arkadaşlar merhaba sitemizde hali hazırda sadece formlarda https aktif oluyor.. ben gelen her isteği https ye yönlendirmek istiyorum...
    bir kaç gün önceine kadar aşağıdaki webconfig rule'ları ile sorun yoktu fakat şu anda aynı rule'lar ile "too many redirect" hatası alıyorum.. yardımcı olana büyük dua edicem.. teşekkürler..

    <rules>
    <clear />
            <rule name="Redirect to https" enabled="true" stopProcessing="true">
                <match url=".*" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                    <add input="{URL}" matchType="Pattern" pattern="\/Admin\/(.+).(aspx)" negate="true" />
                    <add input="{URL}" matchType="Pattern" pattern="\/modules\/(.+).(aspx)" negate="true" />
                </conditions>
                <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" redirectType="Permanent" />
            </rule>                
            <rule name="CanonicalHostNameRule1">
                <match url="(.*)" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{HTTP_HOST}" pattern="^www\.xxxxx\.com$" negate="true" />
                </conditions>
                <action type="Redirect" url="https://www.xxxxx.com/{R:1}" />
            </rule>
    
            <rule name="old-rdr" enabled="true" stopProcessing="true">
                <match url="(.*)" />
                <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
                    <add input="{URL}" pattern="\/kategori\/(.+).(aspx)" />
                    <add input="{URL}" pattern="\/kategori\/(.+).(aspx)" />
                    <add input="{URL}" pattern="\/urun\/(.+).(aspx)" />
                </conditions>
                <action type="Redirect" url="{C:1}" />
            </rule>
            <rule name="301" enabled="true" stopProcessing="true">
                <match url="(.*)" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    <add input="{URL}" pattern="(.+).(axd)" negate="true" />
                    <add input="{DB:{R:0}301}" pattern="(.+)" />
                </conditions>
                <action type="Redirect" url="{C:1}" appendQueryString="false" />
            </rule>
            <rule name="Rewrite" enabled="true" stopProcessing="true">
                <match url="(.*)" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    <add input="{URL}" pattern="(.+).(axd)" negate="true" />
                    <add input="{DB:{R:0}}" pattern="(.+)" />
                </conditions>
                <action type="Rewrite" url="{C:0}" />
            </rule>
  • 26-04-2017, 19:53:17
    #2
    <rule name="Redirect to https" enabled="true" stopProcessing="true">
    Şu ruleyi kapsayan alanı aşağıdaki ile değiştirip dener misin bi?


                    <rule name="Redirect to https" stopProcessing="true">
                        <match url="(.*)" />
                        <conditions>
                            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                        </conditions>
                        <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
                    </rule>
  • 27-04-2017, 00:34:54
    #3
    ranuna adlı üyeden alıntı: mesajı görüntüle
    <rule name="Redirect to https" enabled="true" stopProcessing="true">
    Şu ruleyi kapsayan alanı aşağıdaki ile değiştirip dener misin bi?


                    <rule name="Redirect to https" stopProcessing="true">
                        <match url="(.*)" />
                        <conditions>
                            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                        </conditions>
                        <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
                    </rule>
    hocam cevabın için teşekkür ederim.. dediğin gibi yaptım sanıyorum ama sonuç aynı.. kafayı yememek içten değil..
  • 27-04-2017, 10:21:00
    #4
    1 ay önce aynı sorunları yaşayan biri olarak sana en kolay yolu ve alternatif yolları yazayım.
    Kolay yol ve tercih ettiğim yol Google konsola https olarak siteni ve sitemap adresini eklemen olacaktır. Başka hiçbir işlem yapmana gerek yok. Kısa sürede google bunu benimsiyor.
    Diğer birkaç kod var. Hangisi çalışıyor bilmiyorum. Ama birinin çalıştığı kesin.
    <rule name="HTTP to HTTPS redirect" stopProcessing="true">
    <match url="(.*)" />
    <conditions>
    <add input="{HTTPS}" pattern="off" ignoreCase="true" />
    </conditions>
    <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
    </rule>

    DİĞER KOD:
    <rule name="Redirect to http" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
    <match url="*" negate="false" />
    <conditions logicalGrouping="MatchAny">
    <add input="{HTTPS}" pattern="off" />
    </conditions>
    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
    </rule>

    VE SON OLARAK BUNUDA DENEYEBİLİRSİN:
    <rule name="Redirect to https" stopProcessing="true">
    <match url=".*" />
    <conditions>
    <add input="{HTTPS}" pattern="off" ignoreCase="true" />
    </conditions>
    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
    </rule>
  • 27-04-2017, 13:35:33
    #5
    Hocam teşekkürler.. aslında tam olarak problem şu ki "bütün istekleri https'ye yönlendir" rule u çalışınca diğer rule lardan biriyle çakışıyor ve "too many redirect" hatası veriyor.. çakışan rule'u düzeltmek gerekiyor gibi..
  • 27-04-2017, 15:12:00
    #6
    tanerf82 adlı üyeden alıntı: mesajı görüntüle
    Hocam teşekkürler.. aslında tam olarak problem şu ki "bütün istekleri https'ye yönlendir" rule u çalışınca diğer rule lardan biriyle çakışıyor ve "too many redirect" hatası veriyor.. çakışan rule'u düzeltmek gerekiyor gibi..
    Rule adını değiştirmeyi denedin mi?
  • 05-05-2017, 23:17:37
    #7
    kommagene adlı üyeden alıntı: mesajı görüntüle
    Rule adını değiştirmeyi denedin mi?
    yaptım hocam yapmam mı.. yok malesef..