Как в конфиге Apache сделать редирект?
Сейчас используется конфиг от ISPmanager, в нем есть https.
Нужно чтобы с доменов site.ru, www.site.ru,
https://site.ru и
https://www.site.ru всегда открывался
https://www.site.ru .
<VirtualHost 185.105.224.32:80>
ServerName site.ru
DocumentRoot /var/www/site/data/www/site.ru
ServerAdmin admin@site.ru
AddDefaultCharset off
AssignUserID site site
CustomLog /var/www/httpd-logs/site.ru.access.log combined
ErrorLog /var/www/httpd-logs/site.ru.error.log
<FilesMatch "\.ph(p[3-5]?|tml)$">
SetHandler application/x-httpd-php5
</FilesMatch>
ScriptAlias /php-bin/ /var/www/php-bin-isp-php70/site/
AddHandler application/x-httpd-php5 .php .php3 .php4 .php5 .phtml
Action application/x-httpd-php5 /php-bin/php
ServerAlias www.site.ru
DirectoryIndex index.html index.php
</VirtualHost>
<FilesMatch "\.ph(p[3-5]?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
<Directory /var/www/site/data/www/site.ru>
Options +Includes -ExecCGI
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</Directory>
<VirtualHost 185.105.224.32:443>
ServerName site.ru
DocumentRoot /var/www/site/data/www/site.ru
ServerAdmin admin@site.ru
AddDefaultCharset off
SSLEngine on
SSLCertificateFile "/var/www/httpd-cert/site/site.ru_le1.crt"
SSLCertificateKeyFile "/var/www/httpd-cert/site/site.ru_le1.key"
SSLHonorCipherOrder on
SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
AssignUserID site site
CustomLog /var/www/httpd-logs/site.ru.access.log combined
ErrorLog /var/www/httpd-logs/site.ru.error.log
<FilesMatch "\.ph(p[3-5]?|tml)$">
SetHandler application/x-httpd-php5
</FilesMatch>
SSLCertificateChainFile "/var/www/httpd-cert/sveaborg/site.ru_le1.ca"
ScriptAlias /php-bin/ /var/www/php-bin-isp-php70/site/
AddHandler application/x-httpd-php5 .php .php3 .php4 .php5 .phtml
Action application/x-httpd-php5 /php-bin/php
ServerAlias www.site.ru
DirectoryIndex index.html index.php
</VirtualHost>