I have one serveur with multiple domains. I'd like to redirect only one "site-internet.com" to ssl configuration.
I'd like to do :
- www.site-internet.com => https://www.site-internet.com
- site-internet.com => https://www.site-internet.com
- test.site-internet.com => http://test.site-internet.com
This is my apache conf file
NameVirtualHost *:80
<VirtualHost *:80>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^test.site-internet\.com$[NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ http://test.site-internet.com/$1 [NC,R=301,L]
RewriteCond %{HTTP_HOST} ^(.*)\.site-internet\.com$
RewriteCond %{HTTP_HOST} ^site-internet\.com$
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301]
</VirtualHost>
But this don't work. What should I correct ?