Forcing HTTPS

The best way we've found to send requests to HTTPS is this:

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
This works for any domain/sub-domain.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Letting AutoSSL get past a protected directory

There are many reasons why you want to protect a subdomain or directory from the public. You...