• 08-01-2022, 14:13:57
    #1
    Merhabalar,

    <IfModule mod_rewrite.c>
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    </IfModule>


    kodunu kulanıyorum https yönlenmesi + www eki için..

    fakat sitemdeki bir image klasöründeki image uzantılarında bir dizin altındaki bu yönlendirmeleri yapmasını istemiyorum

    if koşulu nası eklerim bu koda?


    http://www.xxxxxxx.com/image/test/16...97b15c9f5f.jpg

    yani örnek bu url girince http açabilsinler https yönlendirmesin istiyorum
  • 08-01-2022, 14:39:06
    #2
    Çözümü Buldum!


    İhtiyacı olanlar için
    Alıntı

    RewriteEngine On

    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    # force https:// for all except some selected URLs
    RewriteCond %{HTTPS} off
    RewriteCond %{THE_REQUEST} !/commerce_paypal/ [NC]
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    # force http:// for selected URLs
    RewriteCond %{HTTPS} on
    RewriteCond %{THE_REQUEST} /commerce_paypal/ [NC]
    RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]