File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 16
16
#
17
17
# (!) NEVER USE BOTH RULES AT THE SAME TIME!
18
18
19
+ # (1) The two rules assume by default that both HTTP and HTTPS
20
+ # environnements are available for redirection.
21
+ # If your SSL certificate could not handle one of the domains
22
+ # used during redirection, you should turn the condition on.
23
+ #
24
+ # https://github.com/h5bp/server-configs-apache/issues/52
25
+
19
26
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20
27
21
28
# Option 1: rewrite www.example.com → example.com
22
29
23
30
<IfModule mod_rewrite.c>
24
31
RewriteEngine On
25
- RewriteCond %{HTTPS} !=on
32
+ # (1)
33
+ # RewriteCond %{HTTPS} !=on
26
34
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
27
35
RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301,L]
28
36
</IfModule>
36
44
37
45
# <IfModule mod_rewrite.c>
38
46
# RewriteEngine On
39
- # RewriteCond %{HTTPS} !=on
47
+ # # (1)
48
+ # # RewriteCond %{HTTPS} !=on
40
49
# RewriteCond %{HTTP_HOST} !^www\. [NC]
41
50
# RewriteCond %{SERVER_ADDR} !=127.0.0.1
42
51
# RewriteCond %{SERVER_ADDR} !=::1
You can’t perform that action at this time.
0 commit comments