@@ -300,6 +300,18 @@ AddDefaultCharset utf-8
300300
301301</IfModule >
302302
303+ # ------------------------------------------------------------------------------
304+ # | Force `https://` |
305+ # ------------------------------------------------------------------------------
306+
307+ # Redirect from the `http://` to the `https://` version of the URL.
308+ # https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
309+
310+ # <IfModule mod_rewrite.c>
311+ # RewriteCond %{HTTPS} !=on
312+ # RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
313+ # </IfModule>
314+
303315# ------------------------------------------------------------------------------
304316# | Suppressing / Forcing the `www.` at the beginning of URLs |
305317# ------------------------------------------------------------------------------
@@ -539,19 +551,6 @@ AddDefaultCharset utf-8
539551# </FilesMatch>
540552# </IfModule>
541553
542- # ------------------------------------------------------------------------------
543- # | Secure Sockets Layer (SSL) |
544- # ------------------------------------------------------------------------------
545-
546- # Rewrite secure requests properly in order to prevent SSL certificate warnings.
547- # E.g.: prevent `https://www.example.com` when your certificate only allows
548- # `https://secure.example.com`.
549-
550- # <IfModule mod_rewrite.c>
551- # RewriteCond %{SERVER_PORT} !^443
552- # RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
553- # </IfModule>
554-
555554# ------------------------------------------------------------------------------
556555# | HTTP Strict Transport Security (HSTS) |
557556# ------------------------------------------------------------------------------
0 commit comments