Redirect a sub sub domaine to HTTPS

I have a web site with this URL : A.B.domain.com. I bought a ssl certificate to secure it. Then, I've updated my .conf file to redirect all the HTTP traffic to HTTPS.

I did this for one web site. The problem is that all the others are redirected to https by default. Even if the .conf The file doesn't contain the https configuration.

I think I did a wrong config file and here is the example

<VirtualHost *:80>
 ServerName A.B.domain.com
 ServerSignature Off

 RewriteEngine on
 RewriteCond %{HTTPS} !=on
 RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [NE,R,L]
</VirtualHost>
728x90

0 Answers Redirect a sub sub domaine to HTTPS