: How can I disable the certificate/SSL handshake on the 'www' version of my site served by Apache? We use SSL on the https://www version of our website. Now I would like to disable the SSL
We use SSL on the www version of our website.
Now I would like to disable the SSL connection on the non-www version of our website, so the result is:
non-www => SSL handshake www => no SSL
Can this be done?
More posts by @Shakeerah822
1 Comments
Sorted by latest first Latest Oldest Best
You could do this in your .htaccess file:
RewriteEngine on
# if https and starts with www, go to http version
RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{HTTP_HOST} ^www [NC]
RewriteRule ^(.*)$ %{SERVER_NAME}%{REQUEST_URI} [L,R=301]
# if not https and it doesnt start with www, go to https version
RewriteCond %{SERVER_PORT} !^80$
RewriteCond %{HTTP_HOST} !^www [NC]
RewriteRule ^(.*)$ %{SERVER_NAME}%{REQUEST_URI} [L,R=301]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.