Дубль урлов при редиректе с http на https

Тема в разделе "OpenCart", создана пользователем Marrie, 24 сен 2015.

Метки:
  1. Marrie

    Marrie

    Регистрация:
    7 сен 2015
    Сообщения:
    51
    Симпатии:
    10
    Здравствуйте!
    Собственно проблема:
    вводим в строке https://lacomfy.com/kitchen-furniture - все пашет. Когда вводим не https a http://lacomfy.com/kitchen-furniture пишет ссылку в браузере https://lacomfy.com/index.php?_route_=kitchen-furniture
    Доп. плагинов не использую.

    Много облазила - ничего путного не нашла. Надеюсь что поможете мне. Спасибо



    .htaccsess

    SetEnv HTTPS On
    Options All -ExecCGI -Indexes -Includes +FollowSymLinks
    Options +SymLinksIfOwnerMatch
    ErrorDocument 404 /catalog/view/template/usa/error/no_found.tpl
    # Prevent Directoy listing
    Options -Indexes

    # Prevent Direct Access to files
    <FilesMatch "\.(tpl|ini|log)">
    Order deny,allow
    Deny from all
    </FilesMatch>

    # SEO URL Settings
    RewriteEngine On

    # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

    RewriteBase /
    RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
    RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
    RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
    RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]



    #This setting force logo url to it's home page
    RewriteCond %{QUERY_STRING} ^route=common/home$
    RewriteRule ^index\.php$ https://lacomfy.com/? [R=301,L,NE,NC]

    #This setting force http to https version
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://lacomfy.com/$1 [R=301,L,NE]




    RewriteCond %{SERVER_PORT} ^80$
    RewriteRule ^(.*)$ https://lacomfy.com%{REQUEST_URI} [L,R=301]




    <IfModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
    mod_gzip_item_include mime ^text\.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image\.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
    </IfModule>
    #<ifModule mod_deflate.c>
    # AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
    #</ifModule>
    <ifModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 5 seconds"

    ExpiresByType image/x-icon "access plus 2592000 seconds"
    ExpiresByType image/jpeg "access plus 2592000 seconds"
    ExpiresByType image/png "access plus 2592000 seconds"
    ExpiresByType image/gif "access plus 2592000 seconds"
    ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"

    ExpiresByType text/css "access plus 604800 seconds"
    ExpiresByType text/javascript "access plus 604800 seconds"
    ExpiresByType application/javascript "access plus 604800 seconds"
    ExpiresByType application/x-javascript "access plus 604800 seconds"

    ExpiresByType text/html "access plus 43200 seconds"

    ExpiresByType application/xhtml+xml "access plus 600 seconds"
    </ifModule>



    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
     
  2. kolich85

    kolich85

    Регистрация:
    19 сен 2013
    Сообщения:
    164
    Симпатии:
    93
    А с помощью какого плагина ЧПУ формируете?
     
  3. skiv14

    skiv14

    Регистрация:
    9 июн 2015
    Сообщения:
    437
    Симпатии:
    180
    А если вот это убрать ?

    #This setting force http to https version
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://lacomfy.com/$1 [R=301,L,NE]
     
  4. Dotrox

    Dotrox Команда форума

    Регистрация:
    27 ноя 2012
    Сообщения:
    3.198
    Симпатии:
    1.306
    Вы это где-то в таком виде нашли или сами скомпоновали по аналогии?

    Вместо этих двух правил добавьте это:
    Код:
    RewriteCond %{HTTPS} !on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    И оно должно быть сразу после RewriteEngine On
     
  5. Marrie

    Marrie

    Регистрация:
    7 сен 2015
    Сообщения:
    51
    Симпатии:
    10
    Благодарю Вас за подсказки. Проблема была решена след образом: настройки что я прописала надо было поставить просто выше настроек опенкарта....банально...:Pardon: