Поддержка Проблемы и решения Переадресация

  • Сделал переадресацию с http://домен на https://поддомен.домен
    и теперь когда захожу на http://домен перекидывает постоянно на https://поддомен.домен/drova
    Подскажите, пожалуйста, что не так прописал в .htaccess:

    RewriteEngine On
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(php|html|htm)\ HTTP/
    RewriteRule ^(.*)index\.(php|html|htm)$ https://drova.rosles5/$1 [R=301,L]
    RewriteCond %{HTTP_HOST} ^(www.)?les\.rosles5\.(com|ru)$
    RewriteCond %{REQUEST_URI} !/les/
    RewriteRule ^(.*)$ /les/$1 [L]
    RewriteCond %{HTTP_HOST} ^(www.)?drova\.rosles5\.(com|ru)$
    RewriteCond %{REQUEST_URI} !/drova/
    RewriteRule ^(.*)$ /drova/$1 [L]
    RewriteCond %{HTTPS} on
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    RewriteCond %{HTTPS} off
    RewriteRule \.(?:jpe?g|gif|png|tiff|css|js)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,NC,R=301]
    <IfModule mod_expires.c>
     ExpiresActive On
     ExpiresByType application/javascript "access plus 4 weeks"
     ExpiresByType text/javascript "access plus 4 weeks"
     ExpiresByType text/css "access plus 4 weeks"
     ExpiresByType image/gif "access plus 4 weeks"
     ExpiresByType image/jpeg "access plus 4 weeks"
     ExpiresByType image/png "access plus 4 weeks"
    </IfModule>
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4.0[678] no-gzip
    BrowserMatch bMSIE !no-gzip !gzip-only-text/html
    <ifmodule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_item_include file \.js$
    mod_gzip_item_include file \.css$ </ifmodule>
    </IfModule>
    AddDefaultCharset utf-8
    AddType 'text/html; charset=utf-8' .html .htm .shtml

    Проблема, как я понимаю, в этих строчках:
    RewriteCond %{REQUEST_URI} !/drova/ , но удаляя или заменяя строчки с этим словом «drova» — падает переадресация.

    На http://домен переадресацию сделал с помощью кода:

    
    <?php header("Location: https://поддомен.сайт"); ?>
Просмотр 1 ответа (всего 1)
Просмотр 1 ответа (всего 1)
  • Тема «Переадресация» закрыта для новых ответов.