@@ -130,7 +130,7 @@ Options -MultiViews
130
130
# the `X-UA-Compatible` response header should be send only for
131
131
# HTML documents and not for the other resources.
132
132
133
- <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico |jpe?g|m?js|json(ld)?|m4[av]|manifest|map|markdown|md|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$" >
133
+ <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ic[os] |jpe?g|m?js|json(ld)?|m4[av]|manifest|map|markdown|md|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$" >
134
134
Header unset X-UA-Compatible
135
135
</FilesMatch >
136
136
@@ -226,6 +226,7 @@ Options -MultiViews
226
226
AddType application/x-chrome-extension crx
227
227
AddType application/x-opera-extension oex
228
228
AddType application/x-xpinstall xpi
229
+ AddType text/calendar ics
229
230
AddType text/markdown markdown md
230
231
AddType text/vcard vcard vcf
231
232
AddType text/vnd.rim.location.xloc xloc
@@ -257,6 +258,7 @@ AddDefaultCharset utf-8
257
258
.bbaw \
258
259
.css \
259
260
.geojson \
261
+ .ics \
260
262
.js \
261
263
.json \
262
264
.jsonld \
@@ -369,13 +371,21 @@ AddDefaultCharset utf-8
369
371
#
370
372
# (!) NEVER USE BOTH RULES AT THE SAME TIME!
371
373
374
+ # (1) The two rules assume by default that both HTTP and HTTPS
375
+ # environnements are available for redirection.
376
+ # If your SSL certificate could not handle one of the domains
377
+ # used during redirection, you should turn the condition on.
378
+ #
379
+ # https://github.com/h5bp/server-configs-apache/issues/52
380
+
372
381
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
373
382
374
383
# Option 1: rewrite www.example.com → example.com
375
384
376
385
<IfModule mod_rewrite.c >
377
386
RewriteEngine On
378
- RewriteCond %{HTTPS} !=on
387
+ # (1)
388
+ # RewriteCond %{HTTPS} !=on
379
389
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
380
390
RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301 ,L]
381
391
</IfModule >
@@ -389,7 +399,8 @@ AddDefaultCharset utf-8
389
399
390
400
# <IfModule mod_rewrite.c>
391
401
# RewriteEngine On
392
- # RewriteCond %{HTTPS} !=on
402
+ # # (1)
403
+ # # RewriteCond %{HTTPS} !=on
393
404
# RewriteCond %{HTTP_HOST} !^www\. [NC]
394
405
# RewriteCond %{SERVER_ADDR} !=127.0.0.1
395
406
# RewriteCond %{SERVER_ADDR} !=::1
@@ -443,7 +454,7 @@ AddDefaultCharset utf-8
443
454
# # the `X-Frame-Options` response header should be send only for
444
455
# # HTML documents and not for the other resources.
445
456
446
- # <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico |jpe?g|m?js|json(ld)?|m4[av]|manifest|map|markdown|md|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
457
+ # <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ic[os] |jpe?g|m?js|json(ld)?|m4[av]|manifest|map|markdown|md|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
447
458
# Header unset X-Frame-Options
448
459
# </FilesMatch>
449
460
@@ -478,7 +489,7 @@ AddDefaultCharset utf-8
478
489
# # the `Content-Security-Policy` response header should be send
479
490
# # only for HTML documents and not for the other resources.
480
491
481
- # <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico |jpe?g|m?js|json(ld)?|m4[av]|manifest|map|markdown|md|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
492
+ # <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ic[os] |jpe?g|m?js|json(ld)?|m4[av]|manifest|map|markdown|md|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
482
493
# Header unset Content-Security-Policy
483
494
# </FilesMatch>
484
495
@@ -539,7 +550,7 @@ AddDefaultCharset utf-8
539
550
# include: configuration files, files that contain metadata about the
540
551
# project (e.g.: project dependencies), build scripts, etc..
541
552
542
- <FilesMatch "(^#.*#|\.(bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$" >
553
+ <FilesMatch "(^#.*#|\.(bak|conf|dist|fla|in[ci]|log|orig| psd|sh|sql|sw[op])|~)$" >
543
554
544
555
# Apache < 2.3
545
556
<IfModule !mod_authz_core.c >
@@ -646,7 +657,7 @@ AddDefaultCharset utf-8
646
657
# # the `X-XSS-Protection` response header should be send only for
647
658
# # HTML documents and not for the other resources.
648
659
649
- # <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico |jpe?g|m?js|json(ld)?|m4[av]|manifest|map|markdown|md|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
660
+ # <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ic[os] |jpe?g|m?js|json(ld)?|m4[av]|manifest|map|markdown|md|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
650
661
# Header unset X-XSS-Protection
651
662
# </FilesMatch>
652
663
@@ -759,6 +770,7 @@ ServerSignature Off
759
770
"image/vnd.microsoft.icon" \
760
771
"image/x-icon" \
761
772
"text/cache-manifest" \
773
+ "text/calendar" \
762
774
"text/css" \
763
775
"text/html" \
764
776
"text/javascript" \
@@ -865,6 +877,7 @@ FileETag None
865
877
ExpiresByType application/schema+json "access plus 0 seconds"
866
878
ExpiresByType application/vnd.geo+json "access plus 0 seconds"
867
879
ExpiresByType application/xml "access plus 0 seconds"
880
+ ExpiresByType text/calendar "access plus 0 seconds"
868
881
ExpiresByType text/xml "access plus 0 seconds"
869
882
870
883
0 commit comments