• 29-04-2020, 10:09:52
    #1
    Merhaba

    server 2012 ye göre yapilmiş bir codeigniter sitem var ve buna göre yapilandirilmiş web config dosyası var.
    ben bu siteyi normal web hosting e taşıyorum ama web config dosyasında site içi linkler kısaltılmış olduğundan site içi linkler 404 hatası veriyor ve calismiyor.
    ben bu web config dosyasına göre .htaccess dosyası oluşturmam gerekiyor. bu konuda yardımcı olabilecek varmı acaba.
    web config dosyası içi kodları aşağıda paylaşıyorum.
    Teşekkür ederim.


    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.web>
    <httpRuntime executionTimeout="10000" maxRequestLength="300000000" />
    </system.web>
    <system.webServer>
    
    <rewrite>
    <rules>
    <rule name="Imported Rule 1" enabled="true" stopProcessing="true">
    <match url="^(.*)$" ignoreCase="false" />
    <conditions logicalGrouping="MatchAll">
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
    </rule>
    <rule name="http to https" 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>
    <security>
    <requestFiltering>
    <requestLimits maxAllowedContentLength="2221225472" maxUrl="8192" maxQueryString="4096" />
    </requestFiltering>
    </security>
  • 17-05-2020, 02:10:37
    #2
    win serverdan anlamam ama yorumladığım kadarıyla codeigniter için standart htaccess komutlarının haricinde bir https yönlendirmesi yapılmış.
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
    bu işinizi görecektir, buna ek olarak bir https yönlendirmesi de yaptırabilirsiniz
    onu da
    RewriteCond %{HTTPS} off
    RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
    bunu ekleyerek halledebilirsiniz.