HTTP to HTTPS rewrite

RewriteOptions inherit

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP_HOST} ^www\.exampledomain\.com$

RewriteRule ^/?$ "https\:\/\/exampledomain\.com\/" [R=301,L]

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Error when switching from 'ea' default php to 'alt' Cloudlinux php

It appears the PHP-FPM packages/modules are not currently available with the CloudLinux PHP...

Powered by WHMCompleteSolution