Есть старый сайт на foxline cms. В своё было прописано правило для убирания .php в конце url. Проблема в том, что сейчас не получается никак переехать на https.
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
<ifModule mod_headers.c>
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
<FilesMatch "\.(js|css|txt)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>
</IfModule>
DirectoryIndex index.php
AddType application/x-httpd-php .js
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ / [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)/$ /$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-zA-Z0-9_\-]+)(.*)$ index.php?page=$1 [NC,QSA]
# 09.01.2018 Redirects 404
RewriteRule ^images/catalog/items/thumb/$ /? [L,R=301]
RewriteRule ^single$ /? [L,R=301]
RewriteRule ^favicon$ /themes/freshcold/img/favicon.png? [L,R=301]
RewriteRule ^sistemyi\-komnditsionirovaniya\-i\-klimata$ /sistemyi-konditsionirovaniya-i-klimata? [L,R=301]
RewriteRule ^remont\-oborudovaniya$ /remont? [L,R=301]
RewriteRule ^zapornyie\-ventili$ /ventili? [L,R=301]
RewriteRule ^montaj\-oborudovaniya$ /montaj? [L,R=301]
RewriteRule ^\-1464699812$ /ventilyator_6d-710? [L,R=301]
RewriteRule ^\-1466152458$ /rulony_k-flex? [L,R=301]
RewriteRule ^\-1466152567$ /monobloki-srednej-temperatury-serii-standart? [L,R=301]
Перепробовал много разных вариантов, ничего не подходит
Например при использовании данного правила
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Вылазит ошибка ERR_TOO_MANY_REDIRECTS.
Подскажите, что можно с этим сделать?