Support Home » VirtualHostX » How To's
To force your website to use HTTPS, create a new file in your website's top-level directory called .htaccess
with the following contents...
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
If mod_rewrite
is enabled in your web server (VirtualHostX enables this for you by default), those rules will redirect visitors to your HTTPS site automatically.