Şimdi Ara

turhost iis7 asp ile url rewrite 404 sayfası sorunu

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
2 Misafir - 2 Masaüstü
5 sn
5
Cevap
1
Favori
1.819
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • turhost tan yeni bir paket aldım. bu paket ii7 destekliyor. iis6 da kullandığım 404.asp ile seo uyumlu olarak kullandığım linkleri iis7 de çalıştıramıyorum. Web.Config dosyası şu şekilde

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.web>
    <customErrors redirectMode="ResponseRewrite" mode="On">
    <error statusCode="404" redirect="/404.asp" />
    </customErrors>
    </system.web>
    <system.webServer>
    <httpErrors errorMode="Custom" />
    </system.webServer>
    </configuration>


    *-*-*-*- 404.asp sayfam ise


    <%
    Set strURL = Request.ServerVariables("QUERY_STRING")
    strBolum = Split(strURL,"/")

    If strBolum(2 + KarakterBul(strScriptYolu, "/")) = "haber" OR strBolum(2 + KarakterBul(strScriptYolu, "/")) = "icerik" Then
    Server.Transfer("detay.asp")

    Elseif strBolum(2 + KarakterBul(strScriptYolu, "/")) = "kategori" OR strBolum(2 + KarakterBul(strScriptYolu, "/")) = "icerik-bolumleri" Then
    Server.Transfer("icerik.asp")

    Elseif strBolum(2 + KarakterBul(strScriptYolu, "/")) = "sayfa" Then
    Server.Transfer("sayfa.asp")

    Else
    Response.Status = "301 Moved Permanently"
    Response.AddHeader "Location","http://www.urladresim.com/"
    End If
    %>







  • Sorunu bu şekilde bir kodlama kullanarak çözdüm...


    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <directoryBrowse enabled="false" />

    <validation validateIntegratedModeConfiguration="false" />
    <httpErrors errorMode="Custom" existingResponse="Auto">
    <remove statusCode="404" subStatusCode="-1" />
    <remove statusCode="403" subStatusCode="-1" />
    <remove statusCode="401" subStatusCode="-1" />
    <remove statusCode="405" subStatusCode="-1" />
    <remove statusCode="406" subStatusCode="-1" />
    <remove statusCode="412" subStatusCode="-1" />
    <remove statusCode="500" subStatusCode="-1" />
    <remove statusCode="501" subStatusCode="-1" />
    <remove statusCode="502" subStatusCode="-1" />
    <remove statusCode="503" subStatusCode="-1" />
    <error statusCode="403" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
    <error statusCode="404" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
    <error statusCode="405" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
    <error statusCode="406" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
    <error statusCode="412" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
    <error statusCode="500" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
    <error statusCode="501" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
    <error statusCode="502" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
    <error statusCode="503" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
    </httpErrors>

    </system.webServer>
    </configuration>




  • Konun Hortlıyacağının Farkındayım Fakat Yaklaşık 1 Haftadır Çözümü Arıyordum Çok Teşekkürler
  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.