Skip to content

Commit 060b70c

Browse files
committed
Update example regarding forcing https://
* Improve example by removing the need to edit the domain name. * Move example under the `URL Rewrites` section. Ref: https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
1 parent 9563bbe commit 060b70c

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### HEAD
2+
3+
* Update example regarding forcing `https://`.
4+
15
### 2.8.0 (September 13, 2014)
26

37
* Improve configs for `.rdf` files

dist/.htaccess

+12-13
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)