Vous êtes connecté en tant que anonymous Se Deconnecter
Browse code

commit initial de la branch template-meny

git authored on 14/03/2019 10:30:11
Showing 1 changed files
... ...
@@ -19,7 +19,7 @@
19 19
     # Options +SymLinksIfOwnerMatch
20 20
 
21 21
     # (4)
22
-    RewriteBase /
22
+    RewriteBase /fiches3pro/public/
23 23
 
24 24
     # (5)
25 25
     # RewriteOptions <options>
Browse code

update fonctionnel php5.3

git authored on 05/03/2019 13:26:50
Showing 1 changed files
Browse code

htaccess only rewrite

Emmanuel ROY authored on 13/06/2017 23:03:32
Showing 1 changed files
... ...
@@ -7,316 +7,6 @@
7 7
 #
8 8
 # https://httpd.apache.org/docs/current/howto/htaccess.html.
9 9
 
10
-# ######################################################################
11
-# # CROSS-ORIGIN                                                       #
12
-# ######################################################################
13
-
14
-# ----------------------------------------------------------------------
15
-# | Cross-origin requests                                              |
16
-# ----------------------------------------------------------------------
17
-
18
-# Allow cross-origin requests.
19
-#
20
-# https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
21
-# http://enable-cors.org/
22
-# http://www.w3.org/TR/cors/
23
-
24
-# <IfModule mod_headers.c>
25
-#     Header set Access-Control-Allow-Origin "*"
26
-# </IfModule>
27
-
28
-# ----------------------------------------------------------------------
29
-# | Cross-origin images                                                |
30
-# ----------------------------------------------------------------------
31
-
32
-# Send the CORS header for images when browsers request it.
33
-#
34
-# https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image
35
-# https://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
36
-
37
-<IfModule mod_setenvif.c>
38
-    <IfModule mod_headers.c>
39
-        <FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
40
-            SetEnvIf Origin ":" IS_CORS
41
-            Header set Access-Control-Allow-Origin "*" env=IS_CORS
42
-        </FilesMatch>
43
-    </IfModule>
44
-</IfModule>
45
-
46
-# ----------------------------------------------------------------------
47
-# | Cross-origin web fonts                                             |
48
-# ----------------------------------------------------------------------
49
-
50
-# Allow cross-origin access to web fonts.
51
-
52
-<IfModule mod_headers.c>
53
-    <FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
54
-        Header set Access-Control-Allow-Origin "*"
55
-    </FilesMatch>
56
-</IfModule>
57
-
58
-# ----------------------------------------------------------------------
59
-# | Cross-origin resource timing                                       |
60
-# ----------------------------------------------------------------------
61
-
62
-# Allow cross-origin access to the timing information for all resources.
63
-#
64
-# If a resource isn't served with a `Timing-Allow-Origin` header that
65
-# would allow its timing information to be shared with the document,
66
-# some of the attributes of the `PerformanceResourceTiming` object will
67
-# be set to zero.
68
-#
69
-# http://www.w3.org/TR/resource-timing/
70
-# http://www.stevesouders.com/blog/2014/08/21/resource-timing-practical-tips/
71
-
72
-# <IfModule mod_headers.c>
73
-#     Header set Timing-Allow-Origin: "*"
74
-# </IfModule>
75
-
76
-
77
-# ######################################################################
78
-# # ERRORS                                                             #
79
-# ######################################################################
80
-
81
-# ----------------------------------------------------------------------
82
-# | Custom error messages/pages                                        |
83
-# ----------------------------------------------------------------------
84
-
85
-# Customize what Apache returns to the client in case of an error.
86
-# https://httpd.apache.org/docs/current/mod/core.html#errordocument
87
-
88
-ErrorDocument 404 /404.html
89
-
90
-# ----------------------------------------------------------------------
91
-# | Error prevention                                                   |
92
-# ----------------------------------------------------------------------
93
-
94
-# Disable the pattern matching based on filenames.
95
-#
96
-# This setting prevents Apache from returning a 404 error as the result
97
-# of a rewrite when the directory with the same name does not exist.
98
-#
99
-# https://httpd.apache.org/docs/current/content-negotiation.html#multiviews
100
-
101
-Options -MultiViews
102
-
103
-
104
-# ######################################################################
105
-# # INTERNET EXPLORER                                                  #
106
-# ######################################################################
107
-
108
-# ----------------------------------------------------------------------
109
-# | Document modes                                                     |
110
-# ----------------------------------------------------------------------
111
-
112
-# Force Internet Explorer 8/9/10 to render pages in the highest mode
113
-# available in the various cases when it may not.
114
-#
115
-# https://hsivonen.fi/doctype/#ie8
116
-#
117
-# (!) Starting with Internet Explorer 11, document modes are deprecated.
118
-# If your business still relies on older web apps and services that were
119
-# designed for older versions of Internet Explorer, you might want to
120
-# consider enabling `Enterprise Mode` throughout your company.
121
-#
122
-# https://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode
123
-# http://blogs.msdn.com/b/ie/archive/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11.aspx
124
-
125
-<IfModule mod_headers.c>
126
-
127
-    Header set X-UA-Compatible "IE=edge"
128
-
129
-    # `mod_headers` cannot match based on the content-type, however,
130
-    # the `X-UA-Compatible` response header should be send only for
131
-    # HTML documents and not for the other resources.
132
-
133
-    <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|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
-        Header unset X-UA-Compatible
135
-    </FilesMatch>
136
-
137
-</IfModule>
138
-
139
-# ----------------------------------------------------------------------
140
-# | Iframes cookies                                                    |
141
-# ----------------------------------------------------------------------
142
-
143
-# Allow cookies to be set from iframes in Internet Explorer.
144
-#
145
-# https://msdn.microsoft.com/en-us/library/ms537343.aspx
146
-# http://www.w3.org/TR/2000/CR-P3P-20001215/
147
-
148
-# <IfModule mod_headers.c>
149
-#     Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
150
-# </IfModule>
151
-
152
-
153
-# ######################################################################
154
-# # MEDIA TYPES AND CHARACTER ENCODINGS                                #
155
-# ######################################################################
156
-
157
-# ----------------------------------------------------------------------
158
-# | Media types                                                        |
159
-# ----------------------------------------------------------------------
160
-
161
-# Serve resources with the proper media types (f.k.a. MIME types).
162
-#
163
-# https://www.iana.org/assignments/media-types/media-types.xhtml
164
-# https://httpd.apache.org/docs/current/mod/mod_mime.html#addtype
165
-
166
-<IfModule mod_mime.c>
167
-
168
-  # Data interchange
169
-
170
-    AddType application/atom+xml                        atom
171
-    AddType application/json                            json map topojson
172
-    AddType application/ld+json                         jsonld
173
-    AddType application/rss+xml                         rss
174
-    AddType application/vnd.geo+json                    geojson
175
-    AddType application/xml                             rdf xml
176
-
177
-
178
-  # JavaScript
179
-
180
-    # Normalize to standard type.
181
-    # https://tools.ietf.org/html/rfc4329#section-7.2
182
-
183
-    AddType application/javascript                      js
184
-
185
-
186
-  # Manifest files
187
-
188
-    AddType application/manifest+json                   webmanifest
189
-    AddType application/x-web-app-manifest+json         webapp
190
-    AddType text/cache-manifest                         appcache
191
-
192
-
193
-  # Media files
194
-
195
-    AddType audio/mp4                                   f4a f4b m4a
196
-    AddType audio/ogg                                   oga ogg opus
197
-    AddType image/bmp                                   bmp
198
-    AddType image/svg+xml                               svg svgz
199
-    AddType image/webp                                  webp
200
-    AddType video/mp4                                   f4v f4p m4v mp4
201
-    AddType video/ogg                                   ogv
202
-    AddType video/webm                                  webm
203
-    AddType video/x-flv                                 flv
204
-
205
-    # Serving `.ico` image files with a different media type
206
-    # prevents Internet Explorer from displaying then as images:
207
-    # https://github.com/h5bp/html5-boilerplate/commit/37b5fec090d00f38de64b591bcddcb205aadf8ee
208
-
209
-    AddType image/x-icon                                cur ico
210
-
211
-
212
-  # Web fonts
213
-
214
-    AddType application/font-woff                       woff
215
-    AddType application/font-woff2                      woff2
216
-    AddType application/vnd.ms-fontobject               eot
217
-
218
-    # Browsers usually ignore the font media types and simply sniff
219
-    # the bytes to figure out the font type.
220
-    # https://mimesniff.spec.whatwg.org/#matching-a-font-type-pattern
221
-    #
222
-    # However, Blink and WebKit based browsers will show a warning
223
-    # in the console if the following font types are served with any
224
-    # other media types.
225
-
226
-    AddType application/x-font-ttf                      ttc ttf
227
-    AddType font/opentype                               otf
228
-
229
-
230
-  # Other
231
-
232
-    AddType application/octet-stream                    safariextz
233
-    AddType application/x-bb-appworld                   bbaw
234
-    AddType application/x-chrome-extension              crx
235
-    AddType application/x-opera-extension               oex
236
-    AddType application/x-xpinstall                     xpi
237
-    AddType text/vcard                                  vcard vcf
238
-    AddType text/vnd.rim.location.xloc                  xloc
239
-    AddType text/vtt                                    vtt
240
-    AddType text/x-component                            htc
241
-
242
-</IfModule>
243
-
244
-# ----------------------------------------------------------------------
245
-# | Character encodings                                                |
246
-# ----------------------------------------------------------------------
247
-
248
-# Serve all resources labeled as `text/html` or `text/plain`
249
-# with the media type `charset` parameter set to `UTF-8`.
250
-#
251
-# https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset
252
-
253
-AddDefaultCharset utf-8
254
-
255
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
256
-
257
-# Serve the following file types with the media type `charset`
258
-# parameter set to `UTF-8`.
259
-#
260
-# https://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset
261
-
262
-<IfModule mod_mime.c>
263
-    AddCharset utf-8 .atom \
264
-                     .bbaw \
265
-                     .css \
266
-                     .geojson \
267
-                     .js \
268
-                     .json \
269
-                     .jsonld \
270
-                     .manifest \
271
-                     .rdf \
272
-                     .rss \
273
-                     .topojson \
274
-                     .vtt \
275
-                     .webapp \
276
-                     .webmanifest \
277
-                     .xloc \
278
-                     .xml
279
-</IfModule>
280
-
281
-
282
-# ######################################################################
283
-# # REWRITES                                                           #
284
-# ######################################################################
285
-
286
-# ----------------------------------------------------------------------
287
-# | Rewrite engine                                                     |
288
-# ----------------------------------------------------------------------
289
-
290
-# (1) Turn on the rewrite engine (this is necessary in order for
291
-#     the `RewriteRule` directives to work).
292
-#
293
-#     https://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteEngine
294
-#
295
-# (2) Enable the `FollowSymLinks` option if it isn't already.
296
-#
297
-#     https://httpd.apache.org/docs/current/mod/core.html#options
298
-#
299
-# (3) If your web host doesn't allow the `FollowSymlinks` option,
300
-#     you need to comment it out or remove it, and then uncomment
301
-#     the `Options +SymLinksIfOwnerMatch` line (4), but be aware
302
-#     of the performance impact.
303
-#
304
-#     https://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks
305
-#
306
-# (4) Some cloud hosting services will require you set `RewriteBase`.
307
-#
308
-#     https://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-modrewrite-not-working-on-my-site
309
-#     https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
310
-#
311
-# (5) Depending on how your server is set up, you may also need to
312
-#     use the `RewriteOptions` directive to enable some options for
313
-#     the rewrite engine.
314
-#
315
-#     https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions
316
-#
317
-# (6) Set %{ENV:PROTO} variable, to allow rewrites to redirect with the
318
-#     appropriate schema automatically (http or https).
319
-
320 10
 <IfModule mod_rewrite.c>
321 11
 
322 12
     # (1)
... ...
@@ -345,643 +35,3 @@ AddDefaultCharset utf-8
345 35
 
346 36
 </IfModule>
347 37
 
348
-# ----------------------------------------------------------------------
349
-# | Forcing `https://`                                                 |
350
-# ----------------------------------------------------------------------
351
-
352
-# Redirect from the `http://` to the `https://` version of the URL.
353
-# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
354
-
355
-# <IfModule mod_rewrite.c>
356
-#    RewriteEngine On
357
-#    RewriteCond %{HTTPS} !=on
358
-#    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
359
-# </IfModule>
360
-
361
-# ----------------------------------------------------------------------
362
-# | Suppressing / Forcing the `www.` at the beginning of URLs          |
363
-# ----------------------------------------------------------------------
364
-
365
-# The same content should never be available under two different
366
-# URLs, especially not with and without `www.` at the beginning.
367
-# This can cause SEO problems (duplicate content), and therefore,
368
-# you should choose one of the alternatives and redirect the other
369
-# one.
370
-#
371
-# By default `Option 1` (no `www.`) is activated.
372
-# http://no-www.org/faq.php?q=class_b
373
-#
374
-# If you would prefer to use `Option 2`, just comment out all the
375
-# lines from `Option 1` and uncomment the ones from `Option 2`.
376
-#
377
-# (!) NEVER USE BOTH RULES AT THE SAME TIME!
378
-
379
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
380
-
381
-# Option 1: rewrite www.example.com → example.com
382
-
383
-<IfModule mod_rewrite.c>
384
-    RewriteEngine On
385
-    RewriteCond %{HTTPS} !=on
386
-    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
387
-    RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301,L]
388
-</IfModule>
389
-
390
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
391
-
392
-# Option 2: rewrite example.com → www.example.com
393
-#
394
-# Be aware that the following might not be a good idea if you use "real"
395
-# subdomains for certain parts of your website.
396
-
397
-# <IfModule mod_rewrite.c>
398
-#     RewriteEngine On
399
-#     RewriteCond %{HTTPS} !=on
400
-#     RewriteCond %{HTTP_HOST} !^www\. [NC]
401
-#     RewriteCond %{SERVER_ADDR} !=127.0.0.1
402
-#     RewriteCond %{SERVER_ADDR} !=::1
403
-#     RewriteRule ^ %{ENV:PROTO}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
404
-# </IfModule>
405
-
406
-
407
-# ######################################################################
408
-# # SECURITY                                                           #
409
-# ######################################################################
410
-
411
-# ----------------------------------------------------------------------
412
-# | Clickjacking                                                       |
413
-# ----------------------------------------------------------------------
414
-
415
-# Protect website against clickjacking.
416
-#
417
-# The example below sends the `X-Frame-Options` response header with
418
-# the value `DENY`, informing browsers not to display the content of
419
-# the web page in any frame.
420
-#
421
-# This might not be the best setting for everyone. You should read
422
-# about the other two possible values the `X-Frame-Options` header
423
-# field can have: `SAMEORIGIN` and `ALLOW-FROM`.
424
-# https://tools.ietf.org/html/rfc7034#section-2.1.
425
-#
426
-# Keep in mind that while you could send the `X-Frame-Options` header
427
-# for all of your website’s pages, this has the potential downside that
428
-# it forbids even non-malicious framing of your content (e.g.: when
429
-# users visit your website using a Google Image Search results page).
430
-#
431
-# Nonetheless, you should ensure that you send the `X-Frame-Options`
432
-# header for all pages that allow a user to make a state changing
433
-# operation (e.g: pages that contain one-click purchase links, checkout
434
-# or bank-transfer confirmation pages, pages that make permanent
435
-# configuration changes, etc.).
436
-#
437
-# Sending the `X-Frame-Options` header can also protect your website
438
-# against more than just clickjacking attacks:
439
-# https://cure53.de/xfo-clickjacking.pdf.
440
-#
441
-# https://tools.ietf.org/html/rfc7034
442
-# http://blogs.msdn.com/b/ieinternals/archive/2010/03/30/combating-clickjacking-with-x-frame-options.aspx
443
-# https://www.owasp.org/index.php/Clickjacking
444
-
445
-# <IfModule mod_headers.c>
446
-
447
-#     Header set X-Frame-Options "DENY"
448
-
449
-#     # `mod_headers` cannot match based on the content-type, however,
450
-#     # the `X-Frame-Options` response header should be send only for
451
-#     # HTML documents and not for the other resources.
452
-
453
-#     <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|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)$">
454
-#         Header unset X-Frame-Options
455
-#     </FilesMatch>
456
-
457
-# </IfModule>
458
-
459
-# ----------------------------------------------------------------------
460
-# | Content Security Policy (CSP)                                      |
461
-# ----------------------------------------------------------------------
462
-
463
-# Mitigate the risk of cross-site scripting and other content-injection
464
-# attacks.
465
-#
466
-# This can be done by setting a `Content Security Policy` which
467
-# whitelists trusted sources of content for your website.
468
-#
469
-# The example header below allows ONLY scripts that are loaded from
470
-# the current website's origin (no inline scripts, no CDN, etc).
471
-# That almost certainly won't work as-is for your website!
472
-#
473
-# To make things easier, you can use an online CSP header generator
474
-# such as: http://cspisawesome.com/.
475
-#
476
-# http://content-security-policy.com/
477
-# http://www.html5rocks.com/en/tutorials/security/content-security-policy/
478
-# http://www.w3.org/TR/CSP11/).
479
-
480
-# <IfModule mod_headers.c>
481
-
482
-#     Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
483
-
484
-#     # `mod_headers` cannot match based on the content-type, however,
485
-#     # the `Content-Security-Policy` response header should be send
486
-#     # only for HTML documents and not for the other resources.
487
-
488
-#     <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|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)$">
489
-#         Header unset Content-Security-Policy
490
-#     </FilesMatch>
491
-
492
-# </IfModule>
493
-
494
-# ----------------------------------------------------------------------
495
-# | File access                                                        |
496
-# ----------------------------------------------------------------------
497
-
498
-# Block access to directories without a default document.
499
-#
500
-# You should leave the following uncommented, as you shouldn't allow
501
-# anyone to surf through every directory on your server (which may
502
-# includes rather private places such as the CMS's directories).
503
-
504
-<IfModule mod_autoindex.c>
505
-    Options -Indexes
506
-</IfModule>
507
-
508
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
509
-
510
-# Block access to all hidden files and directories with the exception of
511
-# the visible content from within the `/.well-known/` hidden directory.
512
-#
513
-# These types of files usually contain user preferences or the preserved
514
-# state of an utility, and can include rather private places like, for
515
-# example, the `.git` or `.svn` directories.
516
-#
517
-# The `/.well-known/` directory represents the standard (RFC 5785) path
518
-# prefix for "well-known locations" (e.g.: `/.well-known/manifest.json`,
519
-# `/.well-known/keybase.txt`), and therefore, access to its visible
520
-# content should not be blocked.
521
-#
522
-# https://www.mnot.net/blog/2010/04/07/well-known
523
-# https://tools.ietf.org/html/rfc5785
524
-
525
-<IfModule mod_rewrite.c>
526
-    RewriteEngine On
527
-    RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
528
-    RewriteCond %{SCRIPT_FILENAME} -d [OR]
529
-    RewriteCond %{SCRIPT_FILENAME} -f
530
-    RewriteRule "(^|/)\." - [F]
531
-</IfModule>
532
-
533
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
534
-
535
-# Block access to files that can expose sensitive information.
536
-#
537
-# By default, block access to backup and source files that may be
538
-# left by some text editors and can pose a security risk when anyone
539
-# has access to them.
540
-#
541
-# http://feross.org/cmsploit/
542
-#
543
-# (!) Update the `<FilesMatch>` regular expression from below to
544
-# include any files that might end up on your production server and
545
-# can expose sensitive information about your website. These files may
546
-# include: configuration files, files that contain metadata about the
547
-# project (e.g.: project dependencies), build scripts, etc..
548
-
549
-<FilesMatch "(^#.*#|\.(bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$">
550
-
551
-    # Apache < 2.3
552
-    <IfModule !mod_authz_core.c>
553
-        Order allow,deny
554
-        Deny from all
555
-        Satisfy All
556
-    </IfModule>
557
-
558
-    # Apache ≥ 2.3
559
-    <IfModule mod_authz_core.c>
560
-        Require all denied
561
-    </IfModule>
562
-
563
-</FilesMatch>
564
-
565
-# ----------------------------------------------------------------------
566
-# | HTTP Strict Transport Security (HSTS)                              |
567
-# ----------------------------------------------------------------------
568
-
569
-# Force client-side SSL redirection.
570
-#
571
-# If a user types `example.com` in their browser, even if the server
572
-# redirects them to the secure version of the website, that still leaves
573
-# a window of opportunity (the initial HTTP connection) for an attacker
574
-# to downgrade or redirect the request.
575
-#
576
-# The following header ensures that browser will ONLY connect to your
577
-# server via HTTPS, regardless of what the users type in the browser's
578
-# address bar.
579
-#
580
-# (!) Remove the `includeSubDomains` optional directive if the website's
581
-# subdomains are not using HTTPS.
582
-#
583
-# http://www.html5rocks.com/en/tutorials/security/transport-layer-security/
584
-# https://tools.ietf.org/html/draft-ietf-websec-strict-transport-sec-14#section-6.1
585
-# http://blogs.msdn.com/b/ieinternals/archive/2014/08/18/hsts-strict-transport-security-attacks-mitigations-deployment-https.aspx
586
-
587
-# <IfModule mod_headers.c>
588
-#     Header always set Strict-Transport-Security "max-age=16070400; includeSubDomains"
589
-# </IfModule>
590
-
591
-# ----------------------------------------------------------------------
592
-# | Reducing MIME type security risks                                  |
593
-# ----------------------------------------------------------------------
594
-
595
-# Prevent some browsers from MIME-sniffing the response.
596
-#
597
-# This reduces exposure to drive-by download attacks and cross-origin
598
-# data leaks, and should be left uncommented, especially if the server
599
-# is serving user-uploaded content or content that could potentially be
600
-# treated as executable by the browser.
601
-#
602
-# http://www.slideshare.net/hasegawayosuke/owasp-hasegawa
603
-# http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx
604
-# https://msdn.microsoft.com/en-us/library/ie/gg622941.aspx
605
-# https://mimesniff.spec.whatwg.org/
606
-
607
-<IfModule mod_headers.c>
608
-    Header set X-Content-Type-Options "nosniff"
609
-</IfModule>
610
-
611
-# ----------------------------------------------------------------------
612
-# | Reflected Cross-Site Scripting (XSS) attacks                       |
613
-# ----------------------------------------------------------------------
614
-
615
-# (1) Try to re-enable the cross-site scripting (XSS) filter built
616
-#     into most web browsers.
617
-#
618
-#     The filter is usually enabled by default, but in some cases it
619
-#     may be disabled by the user. However, in Internet Explorer for
620
-#     example, it can be re-enabled just by sending the
621
-#     `X-XSS-Protection` header with the value of `1`.
622
-#
623
-# (2) Prevent web browsers from rendering the web page if a potential
624
-#     reflected (a.k.a non-persistent) XSS attack is detected by the
625
-#     filter.
626
-#
627
-#     By default, if the filter is enabled and browsers detect a
628
-#     reflected XSS attack, they will attempt to block the attack
629
-#     by making the smallest possible modifications to the returned
630
-#     web page.
631
-#
632
-#     Unfortunately, in some browsers (e.g.: Internet Explorer),
633
-#     this default behavior may allow the XSS filter to be exploited,
634
-#     thereby, it's better to inform browsers to prevent the rendering
635
-#     of the page altogether, instead of attempting to modify it.
636
-#
637
-#     https://hackademix.net/2009/11/21/ies-xss-filter-creates-xss-vulnerabilities
638
-#
639
-# (!) Do not rely on the XSS filter to prevent XSS attacks! Ensure that
640
-#     you are taking all possible measures to prevent XSS attacks, the
641
-#     most obvious being: validating and sanitizing your website's inputs.
642
-#
643
-# http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-iv-the-xss-filter.aspx
644
-# http://blogs.msdn.com/b/ieinternals/archive/2011/01/31/controlling-the-internet-explorer-xss-filter-with-the-x-xss-protection-http-header.aspx
645
-# https://www.owasp.org/index.php/Cross-site_Scripting_%28XSS%29
646
-
647
-# <IfModule mod_headers.c>
648
-
649
-#     #                           (1)    (2)
650
-#     Header set X-XSS-Protection "1; mode=block"
651
-
652
-#     # `mod_headers` cannot match based on the content-type, however,
653
-#     # the `X-XSS-Protection` response header should be send only for
654
-#     # HTML documents and not for the other resources.
655
-
656
-#     <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|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)$">
657
-#         Header unset X-XSS-Protection
658
-#     </FilesMatch>
659
-
660
-# </IfModule>
661
-
662
-# ----------------------------------------------------------------------
663
-# | Server-side technology information                                 |
664
-# ----------------------------------------------------------------------
665
-
666
-# Remove the `X-Powered-By` response header that:
667
-#
668
-#  * is set by some frameworks and server-side languages
669
-#    (e.g.: ASP.NET, PHP), and its value contains information
670
-#    about them (e.g.: their name, version number)
671
-#
672
-#  * doesn't provide any value as far as users are concern,
673
-#    and in some cases, the information provided by it can
674
-#    be used by attackers
675
-#
676
-# (!) If you can, you should disable the `X-Powered-By` header from the
677
-# language / framework level (e.g.: for PHP, you can do that by setting
678
-# `expose_php = off` in `php.ini`)
679
-#
680
-# https://php.net/manual/en/ini.core.php#ini.expose-php
681
-
682
-<IfModule mod_headers.c>
683
-    Header unset X-Powered-By
684
-</IfModule>
685
-
686
-# ----------------------------------------------------------------------
687
-# | Server software information                                        |
688
-# ----------------------------------------------------------------------
689
-
690
-# Prevent Apache from adding a trailing footer line containing
691
-# information about the server to the server-generated documents
692
-# (e.g.: error messages, directory listings, etc.)
693
-#
694
-# https://httpd.apache.org/docs/current/mod/core.html#serversignature
695
-
696
-ServerSignature Off
697
-
698
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
699
-
700
-# Prevent Apache from sending in the `Server` response header its
701
-# exact version number, the description of the generic OS-type or
702
-# information about its compiled-in modules.
703
-#
704
-# (!) The `ServerTokens` directive will only work in the main server
705
-# configuration file, so don't try to enable it in the `.htaccess` file!
706
-#
707
-# https://httpd.apache.org/docs/current/mod/core.html#servertokens
708
-
709
-#ServerTokens Prod
710
-
711
-
712
-# ######################################################################
713
-# # WEB PERFORMANCE                                                    #
714
-# ######################################################################
715
-
716
-# ----------------------------------------------------------------------
717
-# | Compression                                                        |
718
-# ----------------------------------------------------------------------
719
-
720
-<IfModule mod_deflate.c>
721
-
722
-    # Force compression for mangled `Accept-Encoding` request headers
723
-    # https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html
724
-
725
-    <IfModule mod_setenvif.c>
726
-        <IfModule mod_headers.c>
727
-            SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
728
-            RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
729
-        </IfModule>
730
-    </IfModule>
731
-
732
-    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
733
-
734
-    # Compress all output labeled with one of the following media types.
735
-    #
736
-    # (!) For Apache versions below version 2.3.7 you don't need to
737
-    # enable `mod_filter` and can remove the `<IfModule mod_filter.c>`
738
-    # and `</IfModule>` lines as `AddOutputFilterByType` is still in
739
-    # the core directives.
740
-    #
741
-    # https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
742
-
743
-    <IfModule mod_filter.c>
744
-        AddOutputFilterByType DEFLATE "application/atom+xml" \
745
-                                      "application/javascript" \
746
-                                      "application/json" \
747
-                                      "application/ld+json" \
748
-                                      "application/manifest+json" \
749
-                                      "application/rdf+xml" \
750
-                                      "application/rss+xml" \
751
-                                      "application/schema+json" \
752
-                                      "application/vnd.geo+json" \
753
-                                      "application/vnd.ms-fontobject" \
754
-                                      "application/x-font-ttf" \
755
-                                      "application/x-javascript" \
756
-                                      "application/x-web-app-manifest+json" \
757
-                                      "application/xhtml+xml" \
758
-                                      "application/xml" \
759
-                                      "font/eot" \
760
-                                      "font/opentype" \
761
-                                      "image/bmp" \
762
-                                      "image/svg+xml" \
763
-                                      "image/vnd.microsoft.icon" \
764
-                                      "image/x-icon" \
765
-                                      "text/cache-manifest" \
766
-                                      "text/css" \
767
-                                      "text/html" \
768
-                                      "text/javascript" \
769
-                                      "text/plain" \
770
-                                      "text/vcard" \
771
-                                      "text/vnd.rim.location.xloc" \
772
-                                      "text/vtt" \
773
-                                      "text/x-component" \
774
-                                      "text/x-cross-domain-policy" \
775
-                                      "text/xml"
776
-
777
-    </IfModule>
778
-
779
-    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
780
-
781
-    # Map the following filename extensions to the specified
782
-    # encoding type in order to make Apache serve the file types
783
-    # with the appropriate `Content-Encoding` response header
784
-    # (do note that this will NOT make Apache compress them!).
785
-    #
786
-    # If these files types would be served without an appropriate
787
-    # `Content-Enable` response header, client applications (e.g.:
788
-    # browsers) wouldn't know that they first need to uncompress
789
-    # the response, and thus, wouldn't be able to understand the
790
-    # content.
791
-    #
792
-    # https://httpd.apache.org/docs/current/mod/mod_mime.html#addencoding
793
-
794
-    <IfModule mod_mime.c>
795
-        AddEncoding gzip              svgz
796
-    </IfModule>
797
-
798
-</IfModule>
799
-
800
-# ----------------------------------------------------------------------
801
-# | Content transformation                                             |
802
-# ----------------------------------------------------------------------
803
-
804
-# Prevent intermediate caches or proxies (e.g.: such as the ones
805
-# used by mobile network providers) from modifying the website's
806
-# content.
807
-#
808
-# https://tools.ietf.org/html/rfc2616#section-14.9.5
809
-#
810
-# (!) If you are using `mod_pagespeed`, please note that setting
811
-# the `Cache-Control: no-transform` response header will prevent
812
-# `PageSpeed` from rewriting `HTML` files, and, if the
813
-# `ModPagespeedDisableRewriteOnNoTransform` directive isn't set
814
-# to `off`, also from rewriting other resources.
815
-#
816
-# https://developers.google.com/speed/pagespeed/module/configuration#notransform
817
-
818
-# <IfModule mod_headers.c>
819
-#     Header merge Cache-Control "no-transform"
820
-# </IfModule>
821
-
822
-# ----------------------------------------------------------------------
823
-# | ETags                                                              |
824
-# ----------------------------------------------------------------------
825
-
826
-# Remove `ETags` as resources are sent with far-future expires headers.
827
-#
828
-# https://developer.yahoo.com/performance/rules.html#etags
829
-# https://tools.ietf.org/html/rfc7232#section-2.3
830
-
831
-# `FileETag None` doesn't work in all cases.
832
-<IfModule mod_headers.c>
833
-    Header unset ETag
834
-</IfModule>
835
-
836
-FileETag None
837
-
838
-# ----------------------------------------------------------------------
839
-# | Expires headers                                                    |
840
-# ----------------------------------------------------------------------
841
-
842
-# Serve resources with far-future expires headers.
843
-#
844
-# (!) If you don't control versioning with filename-based
845
-# cache busting, you should consider lowering the cache times
846
-# to something like one week.
847
-#
848
-# https://httpd.apache.org/docs/current/mod/mod_expires.html
849
-
850
-<IfModule mod_expires.c>
851
-
852
-    ExpiresActive on
853
-    ExpiresDefault                                      "access plus 1 month"
854
-
855
-  # CSS
856
-
857
-    ExpiresByType text/css                              "access plus 1 year"
858
-
859
-
860
-  # Data interchange
861
-
862
-    ExpiresByType application/atom+xml                  "access plus 1 hour"
863
-    ExpiresByType application/rdf+xml                   "access plus 1 hour"
864
-    ExpiresByType application/rss+xml                   "access plus 1 hour"
865
-
866
-    ExpiresByType application/json                      "access plus 0 seconds"
867
-    ExpiresByType application/ld+json                   "access plus 0 seconds"
868
-    ExpiresByType application/schema+json               "access plus 0 seconds"
869
-    ExpiresByType application/vnd.geo+json              "access plus 0 seconds"
870
-    ExpiresByType application/xml                       "access plus 0 seconds"
871
-    ExpiresByType text/xml                              "access plus 0 seconds"
872
-
873
-
874
-  # Favicon (cannot be renamed!) and cursor images
875
-
876
-    ExpiresByType image/vnd.microsoft.icon              "access plus 1 week"
877
-    ExpiresByType image/x-icon                          "access plus 1 week"
878
-
879
-  # HTML
880
-
881
-    ExpiresByType text/html                             "access plus 0 seconds"
882
-
883
-
884
-  # JavaScript
885
-
886
-    ExpiresByType application/javascript                "access plus 1 year"
887
-    ExpiresByType application/x-javascript              "access plus 1 year"
888
-    ExpiresByType text/javascript                       "access plus 1 year"
889
-
890
-
891
-  # Manifest files
892
-
893
-    ExpiresByType application/manifest+json             "access plus 1 week"
894
-    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
895
-    ExpiresByType text/cache-manifest                   "access plus 0 seconds"
896
-
897
-
898
-  # Media files
899
-
900
-    ExpiresByType audio/ogg                             "access plus 1 month"
901
-    ExpiresByType image/bmp                             "access plus 1 month"
902
-    ExpiresByType image/gif                             "access plus 1 month"
903
-    ExpiresByType image/jpeg                            "access plus 1 month"
904
-    ExpiresByType image/png                             "access plus 1 month"
905
-    ExpiresByType image/svg+xml                         "access plus 1 month"
906
-    ExpiresByType image/webp                            "access plus 1 month"
907
-    ExpiresByType video/mp4                             "access plus 1 month"
908
-    ExpiresByType video/ogg                             "access plus 1 month"
909
-    ExpiresByType video/webm                            "access plus 1 month"
910
-
911
-
912
-  # Web fonts
913
-
914
-    # Embedded OpenType (EOT)
915
-    ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
916
-    ExpiresByType font/eot                              "access plus 1 month"
917
-
918
-    # OpenType
919
-    ExpiresByType font/opentype                         "access plus 1 month"
920
-
921
-    # TrueType
922
-    ExpiresByType application/x-font-ttf                "access plus 1 month"
923
-
924
-    # Web Open Font Format (WOFF) 1.0
925
-    ExpiresByType application/font-woff                 "access plus 1 month"
926
-    ExpiresByType application/x-font-woff               "access plus 1 month"
927
-    ExpiresByType font/woff                             "access plus 1 month"
928
-
929
-    # Web Open Font Format (WOFF) 2.0
930
-    ExpiresByType application/font-woff2                "access plus 1 month"
931
-
932
-
933
-  # Other
934
-
935
-    ExpiresByType text/x-cross-domain-policy            "access plus 1 week"
936
-
937
-</IfModule>
938
-
939
-# ----------------------------------------------------------------------
940
-# | File concatenation                                                 |
941
-# ----------------------------------------------------------------------
942
-
943
-# Allow concatenation from within specific files.
944
-#
945
-# e.g.:
946
-#
947
-#   If you have the following lines in a file called, for
948
-#   example, `main.combined.js`:
949
-#
950
-#       <!--#include file="js/jquery.js" -->
951
-#       <!--#include file="js/jquery.timer.js" -->
952
-#
953
-#   Apache will replace those lines with the content of the
954
-#   specified files.
955
-
956
-# <IfModule mod_include.c>
957
-#     <FilesMatch "\.combined\.js$">
958
-#         Options +Includes
959
-#         AddOutputFilterByType INCLUDES application/javascript \
960
-#                                        application/x-javascript \
961
-#                                        text/javascript
962
-#         SetOutputFilter INCLUDES
963
-#     </FilesMatch>
964
-#     <FilesMatch "\.combined\.css$">
965
-#         Options +Includes
966
-#         AddOutputFilterByType INCLUDES text/css
967
-#         SetOutputFilter INCLUDES
968
-#     </FilesMatch>
969
-# </IfModule>
970
-
971
-# ----------------------------------------------------------------------
972
-# | Filename-based cache busting                                       |
973
-# ----------------------------------------------------------------------
974
-
975
-# If you're not using a build process to manage your filename version
976
-# revving, you might want to consider enabling the following directives
977
-# to route all requests such as `/style.12345.css` to `/style.css`.
978
-#
979
-# To understand why this is important and even a better solution than
980
-# using something like `*.css?v231`, please see:
981
-# http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
982
-
983
-# <IfModule mod_rewrite.c>
984
-#     RewriteEngine On
985
-#     RewriteCond %{REQUEST_FILENAME} !-f
986
-#     RewriteRule ^(.+)\.(\d+)\.(bmp|css|cur|gif|ico|jpe?g|js|png|svgz?|webp|webmanifest)$ $1.$3 [L]
987
-# </IfModule>
Browse code

Version fonctionnelle de base

Emmanuel ROY authored on 13/06/2017 22:54:16
Showing 1 changed files
1 1
new file mode 100755
... ...
@@ -0,0 +1,987 @@
1
+# Apache Server Configs v2.14.0 | MIT License
2
+# https://github.com/h5bp/server-configs-apache
3
+
4
+# (!) Using `.htaccess` files slows down Apache, therefore, if you have
5
+# access to the main server configuration file (which is usually called
6
+# `httpd.conf`), you should add this logic there.
7
+#
8
+# https://httpd.apache.org/docs/current/howto/htaccess.html.
9
+
10
+# ######################################################################
11
+# # CROSS-ORIGIN                                                       #
12
+# ######################################################################
13
+
14
+# ----------------------------------------------------------------------
15
+# | Cross-origin requests                                              |
16
+# ----------------------------------------------------------------------
17
+
18
+# Allow cross-origin requests.
19
+#
20
+# https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
21
+# http://enable-cors.org/
22
+# http://www.w3.org/TR/cors/
23
+
24
+# <IfModule mod_headers.c>
25
+#     Header set Access-Control-Allow-Origin "*"
26
+# </IfModule>
27
+
28
+# ----------------------------------------------------------------------
29
+# | Cross-origin images                                                |
30
+# ----------------------------------------------------------------------
31
+
32
+# Send the CORS header for images when browsers request it.
33
+#
34
+# https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image
35
+# https://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
36
+
37
+<IfModule mod_setenvif.c>
38
+    <IfModule mod_headers.c>
39
+        <FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
40
+            SetEnvIf Origin ":" IS_CORS
41
+            Header set Access-Control-Allow-Origin "*" env=IS_CORS
42
+        </FilesMatch>
43
+    </IfModule>
44
+</IfModule>
45
+
46
+# ----------------------------------------------------------------------
47
+# | Cross-origin web fonts                                             |
48
+# ----------------------------------------------------------------------
49
+
50
+# Allow cross-origin access to web fonts.
51
+
52
+<IfModule mod_headers.c>
53
+    <FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
54
+        Header set Access-Control-Allow-Origin "*"
55
+    </FilesMatch>
56
+</IfModule>
57
+
58
+# ----------------------------------------------------------------------
59
+# | Cross-origin resource timing                                       |
60
+# ----------------------------------------------------------------------
61
+
62
+# Allow cross-origin access to the timing information for all resources.
63
+#
64
+# If a resource isn't served with a `Timing-Allow-Origin` header that
65
+# would allow its timing information to be shared with the document,
66
+# some of the attributes of the `PerformanceResourceTiming` object will
67
+# be set to zero.
68
+#
69
+# http://www.w3.org/TR/resource-timing/
70
+# http://www.stevesouders.com/blog/2014/08/21/resource-timing-practical-tips/
71
+
72
+# <IfModule mod_headers.c>
73
+#     Header set Timing-Allow-Origin: "*"
74
+# </IfModule>
75
+
76
+
77
+# ######################################################################
78
+# # ERRORS                                                             #
79
+# ######################################################################
80
+
81
+# ----------------------------------------------------------------------
82
+# | Custom error messages/pages                                        |
83
+# ----------------------------------------------------------------------
84
+
85
+# Customize what Apache returns to the client in case of an error.
86
+# https://httpd.apache.org/docs/current/mod/core.html#errordocument
87
+
88
+ErrorDocument 404 /404.html
89
+
90
+# ----------------------------------------------------------------------
91
+# | Error prevention                                                   |
92
+# ----------------------------------------------------------------------
93
+
94
+# Disable the pattern matching based on filenames.
95
+#
96
+# This setting prevents Apache from returning a 404 error as the result
97
+# of a rewrite when the directory with the same name does not exist.
98
+#
99
+# https://httpd.apache.org/docs/current/content-negotiation.html#multiviews
100
+
101
+Options -MultiViews
102
+
103
+
104
+# ######################################################################
105
+# # INTERNET EXPLORER                                                  #
106
+# ######################################################################
107
+
108
+# ----------------------------------------------------------------------
109
+# | Document modes                                                     |
110
+# ----------------------------------------------------------------------
111
+
112
+# Force Internet Explorer 8/9/10 to render pages in the highest mode
113
+# available in the various cases when it may not.
114
+#
115
+# https://hsivonen.fi/doctype/#ie8
116
+#
117
+# (!) Starting with Internet Explorer 11, document modes are deprecated.
118
+# If your business still relies on older web apps and services that were
119
+# designed for older versions of Internet Explorer, you might want to
120
+# consider enabling `Enterprise Mode` throughout your company.
121
+#
122
+# https://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode
123
+# http://blogs.msdn.com/b/ie/archive/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11.aspx
124
+
125
+<IfModule mod_headers.c>
126
+
127
+    Header set X-UA-Compatible "IE=edge"
128
+
129
+    # `mod_headers` cannot match based on the content-type, however,
130
+    # the `X-UA-Compatible` response header should be send only for
131
+    # HTML documents and not for the other resources.
132
+
133
+    <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|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
+        Header unset X-UA-Compatible
135
+    </FilesMatch>
136
+
137
+</IfModule>
138
+
139
+# ----------------------------------------------------------------------
140
+# | Iframes cookies                                                    |
141
+# ----------------------------------------------------------------------
142
+
143
+# Allow cookies to be set from iframes in Internet Explorer.
144
+#
145
+# https://msdn.microsoft.com/en-us/library/ms537343.aspx
146
+# http://www.w3.org/TR/2000/CR-P3P-20001215/
147
+
148
+# <IfModule mod_headers.c>
149
+#     Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
150
+# </IfModule>
151
+
152
+
153
+# ######################################################################
154
+# # MEDIA TYPES AND CHARACTER ENCODINGS                                #
155
+# ######################################################################
156
+
157
+# ----------------------------------------------------------------------
158
+# | Media types                                                        |
159
+# ----------------------------------------------------------------------
160
+
161
+# Serve resources with the proper media types (f.k.a. MIME types).
162
+#
163
+# https://www.iana.org/assignments/media-types/media-types.xhtml
164
+# https://httpd.apache.org/docs/current/mod/mod_mime.html#addtype
165
+
166
+<IfModule mod_mime.c>
167
+
168
+  # Data interchange
169
+
170
+    AddType application/atom+xml                        atom
171
+    AddType application/json                            json map topojson
172
+    AddType application/ld+json                         jsonld
173
+    AddType application/rss+xml                         rss
174
+    AddType application/vnd.geo+json                    geojson
175
+    AddType application/xml                             rdf xml
176
+
177
+
178
+  # JavaScript
179
+
180
+    # Normalize to standard type.
181
+    # https://tools.ietf.org/html/rfc4329#section-7.2
182
+
183
+    AddType application/javascript                      js
184
+
185
+
186
+  # Manifest files
187
+
188
+    AddType application/manifest+json                   webmanifest
189
+    AddType application/x-web-app-manifest+json         webapp
190
+    AddType text/cache-manifest                         appcache
191
+
192
+
193
+  # Media files
194
+
195
+    AddType audio/mp4                                   f4a f4b m4a
196
+    AddType audio/ogg                                   oga ogg opus
197
+    AddType image/bmp                                   bmp
198
+    AddType image/svg+xml                               svg svgz
199
+    AddType image/webp                                  webp
200
+    AddType video/mp4                                   f4v f4p m4v mp4
201
+    AddType video/ogg                                   ogv
202
+    AddType video/webm                                  webm
203
+    AddType video/x-flv                                 flv
204
+
205
+    # Serving `.ico` image files with a different media type
206
+    # prevents Internet Explorer from displaying then as images:
207
+    # https://github.com/h5bp/html5-boilerplate/commit/37b5fec090d00f38de64b591bcddcb205aadf8ee
208
+
209
+    AddType image/x-icon                                cur ico
210
+
211
+
212
+  # Web fonts
213
+
214
+    AddType application/font-woff                       woff
215
+    AddType application/font-woff2                      woff2
216
+    AddType application/vnd.ms-fontobject               eot
217
+
218
+    # Browsers usually ignore the font media types and simply sniff
219
+    # the bytes to figure out the font type.
220
+    # https://mimesniff.spec.whatwg.org/#matching-a-font-type-pattern
221
+    #
222
+    # However, Blink and WebKit based browsers will show a warning
223
+    # in the console if the following font types are served with any
224
+    # other media types.
225
+
226
+    AddType application/x-font-ttf                      ttc ttf
227
+    AddType font/opentype                               otf
228
+
229
+
230
+  # Other
231
+
232
+    AddType application/octet-stream                    safariextz
233
+    AddType application/x-bb-appworld                   bbaw
234
+    AddType application/x-chrome-extension              crx
235
+    AddType application/x-opera-extension               oex
236
+    AddType application/x-xpinstall                     xpi
237
+    AddType text/vcard                                  vcard vcf
238
+    AddType text/vnd.rim.location.xloc                  xloc
239
+    AddType text/vtt                                    vtt
240
+    AddType text/x-component                            htc
241
+
242
+</IfModule>
243
+
244
+# ----------------------------------------------------------------------
245
+# | Character encodings                                                |
246
+# ----------------------------------------------------------------------
247
+
248
+# Serve all resources labeled as `text/html` or `text/plain`
249
+# with the media type `charset` parameter set to `UTF-8`.
250
+#
251
+# https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset
252
+
253
+AddDefaultCharset utf-8
254
+
255
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
256
+
257
+# Serve the following file types with the media type `charset`
258
+# parameter set to `UTF-8`.
259
+#
260
+# https://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset
261
+
262
+<IfModule mod_mime.c>
263
+    AddCharset utf-8 .atom \
264
+                     .bbaw \
265
+                     .css \
266
+                     .geojson \
267
+                     .js \
268
+                     .json \
269
+                     .jsonld \
270
+                     .manifest \
271
+                     .rdf \
272
+                     .rss \
273
+                     .topojson \
274
+                     .vtt \
275
+                     .webapp \
276
+                     .webmanifest \
277
+                     .xloc \
278
+                     .xml
279
+</IfModule>
280
+
281
+
282
+# ######################################################################
283
+# # REWRITES                                                           #
284
+# ######################################################################
285
+
286
+# ----------------------------------------------------------------------
287
+# | Rewrite engine                                                     |
288
+# ----------------------------------------------------------------------
289
+
290
+# (1) Turn on the rewrite engine (this is necessary in order for
291
+#     the `RewriteRule` directives to work).
292
+#
293
+#     https://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteEngine
294
+#
295
+# (2) Enable the `FollowSymLinks` option if it isn't already.
296
+#
297
+#     https://httpd.apache.org/docs/current/mod/core.html#options
298
+#
299
+# (3) If your web host doesn't allow the `FollowSymlinks` option,
300
+#     you need to comment it out or remove it, and then uncomment
301
+#     the `Options +SymLinksIfOwnerMatch` line (4), but be aware
302
+#     of the performance impact.
303
+#
304
+#     https://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks
305
+#
306
+# (4) Some cloud hosting services will require you set `RewriteBase`.
307
+#
308
+#     https://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-modrewrite-not-working-on-my-site
309
+#     https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
310
+#
311
+# (5) Depending on how your server is set up, you may also need to
312
+#     use the `RewriteOptions` directive to enable some options for
313
+#     the rewrite engine.
314
+#
315
+#     https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions
316
+#
317
+# (6) Set %{ENV:PROTO} variable, to allow rewrites to redirect with the
318
+#     appropriate schema automatically (http or https).
319
+
320
+<IfModule mod_rewrite.c>
321
+
322
+    # (1)
323
+    RewriteEngine On
324
+
325
+    # (2)
326
+    Options +FollowSymlinks
327
+
328
+    # (3)
329
+    # Options +SymLinksIfOwnerMatch
330
+
331
+    # (4)
332
+    RewriteBase /
333
+
334
+    # (5)
335
+    # RewriteOptions <options>
336
+
337
+    # (6)
338
+	RewriteCond %{REQUEST_FILENAME} !-f
339
+	RewriteCond %{REQUEST_FILENAME} !-d
340
+	RewriteRule . index.php [L]
341
+    RewriteCond %{HTTPS} =on
342
+    RewriteRule ^ - [env=proto:https]
343
+    RewriteCond %{HTTPS} !=on
344
+    RewriteRule ^ - [env=proto:http]
345
+
346
+</IfModule>
347
+
348
+# ----------------------------------------------------------------------
349
+# | Forcing `https://`                                                 |
350
+# ----------------------------------------------------------------------
351
+
352
+# Redirect from the `http://` to the `https://` version of the URL.
353
+# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
354
+
355
+# <IfModule mod_rewrite.c>
356
+#    RewriteEngine On
357
+#    RewriteCond %{HTTPS} !=on
358
+#    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
359
+# </IfModule>
360
+
361
+# ----------------------------------------------------------------------
362
+# | Suppressing / Forcing the `www.` at the beginning of URLs          |
363
+# ----------------------------------------------------------------------
364
+
365
+# The same content should never be available under two different
366
+# URLs, especially not with and without `www.` at the beginning.
367
+# This can cause SEO problems (duplicate content), and therefore,
368
+# you should choose one of the alternatives and redirect the other
369
+# one.
370
+#
371
+# By default `Option 1` (no `www.`) is activated.
372
+# http://no-www.org/faq.php?q=class_b
373
+#
374
+# If you would prefer to use `Option 2`, just comment out all the
375
+# lines from `Option 1` and uncomment the ones from `Option 2`.
376
+#
377
+# (!) NEVER USE BOTH RULES AT THE SAME TIME!
378
+
379
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
380
+
381
+# Option 1: rewrite www.example.com → example.com
382
+
383
+<IfModule mod_rewrite.c>
384
+    RewriteEngine On
385
+    RewriteCond %{HTTPS} !=on
386
+    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
387
+    RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301,L]
388
+</IfModule>
389
+
390
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
391
+
392
+# Option 2: rewrite example.com → www.example.com
393
+#
394
+# Be aware that the following might not be a good idea if you use "real"
395
+# subdomains for certain parts of your website.
396
+
397
+# <IfModule mod_rewrite.c>
398
+#     RewriteEngine On
399
+#     RewriteCond %{HTTPS} !=on
400
+#     RewriteCond %{HTTP_HOST} !^www\. [NC]
401
+#     RewriteCond %{SERVER_ADDR} !=127.0.0.1
402
+#     RewriteCond %{SERVER_ADDR} !=::1
403
+#     RewriteRule ^ %{ENV:PROTO}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
404
+# </IfModule>
405
+
406
+
407
+# ######################################################################
408
+# # SECURITY                                                           #
409
+# ######################################################################
410
+
411
+# ----------------------------------------------------------------------
412
+# | Clickjacking                                                       |
413
+# ----------------------------------------------------------------------
414
+
415
+# Protect website against clickjacking.
416
+#
417
+# The example below sends the `X-Frame-Options` response header with
418
+# the value `DENY`, informing browsers not to display the content of
419
+# the web page in any frame.
420
+#
421
+# This might not be the best setting for everyone. You should read
422
+# about the other two possible values the `X-Frame-Options` header
423
+# field can have: `SAMEORIGIN` and `ALLOW-FROM`.
424
+# https://tools.ietf.org/html/rfc7034#section-2.1.
425
+#
426
+# Keep in mind that while you could send the `X-Frame-Options` header
427
+# for all of your website’s pages, this has the potential downside that
428
+# it forbids even non-malicious framing of your content (e.g.: when
429
+# users visit your website using a Google Image Search results page).
430
+#
431
+# Nonetheless, you should ensure that you send the `X-Frame-Options`
432
+# header for all pages that allow a user to make a state changing
433
+# operation (e.g: pages that contain one-click purchase links, checkout
434
+# or bank-transfer confirmation pages, pages that make permanent
435
+# configuration changes, etc.).
436
+#
437
+# Sending the `X-Frame-Options` header can also protect your website
438
+# against more than just clickjacking attacks:
439
+# https://cure53.de/xfo-clickjacking.pdf.
440
+#
441
+# https://tools.ietf.org/html/rfc7034
442
+# http://blogs.msdn.com/b/ieinternals/archive/2010/03/30/combating-clickjacking-with-x-frame-options.aspx
443
+# https://www.owasp.org/index.php/Clickjacking
444
+
445
+# <IfModule mod_headers.c>
446
+
447
+#     Header set X-Frame-Options "DENY"
448
+
449
+#     # `mod_headers` cannot match based on the content-type, however,
450
+#     # the `X-Frame-Options` response header should be send only for
451
+#     # HTML documents and not for the other resources.
452
+
453
+#     <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|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)$">
454
+#         Header unset X-Frame-Options
455
+#     </FilesMatch>
456
+
457
+# </IfModule>
458
+
459
+# ----------------------------------------------------------------------
460
+# | Content Security Policy (CSP)                                      |
461
+# ----------------------------------------------------------------------
462
+
463
+# Mitigate the risk of cross-site scripting and other content-injection
464
+# attacks.
465
+#
466
+# This can be done by setting a `Content Security Policy` which
467
+# whitelists trusted sources of content for your website.
468
+#
469
+# The example header below allows ONLY scripts that are loaded from
470
+# the current website's origin (no inline scripts, no CDN, etc).
471
+# That almost certainly won't work as-is for your website!
472
+#
473
+# To make things easier, you can use an online CSP header generator
474
+# such as: http://cspisawesome.com/.
475
+#
476
+# http://content-security-policy.com/
477
+# http://www.html5rocks.com/en/tutorials/security/content-security-policy/
478
+# http://www.w3.org/TR/CSP11/).
479
+
480
+# <IfModule mod_headers.c>
481
+
482
+#     Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
483
+
484
+#     # `mod_headers` cannot match based on the content-type, however,
485
+#     # the `Content-Security-Policy` response header should be send
486
+#     # only for HTML documents and not for the other resources.
487
+
488
+#     <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|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)$">
489
+#         Header unset Content-Security-Policy
490
+#     </FilesMatch>
491
+
492
+# </IfModule>
493
+
494
+# ----------------------------------------------------------------------
495
+# | File access                                                        |
496
+# ----------------------------------------------------------------------
497
+
498
+# Block access to directories without a default document.
499
+#
500
+# You should leave the following uncommented, as you shouldn't allow
501
+# anyone to surf through every directory on your server (which may
502
+# includes rather private places such as the CMS's directories).
503
+
504
+<IfModule mod_autoindex.c>
505
+    Options -Indexes
506
+</IfModule>
507
+
508
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
509
+
510
+# Block access to all hidden files and directories with the exception of
511
+# the visible content from within the `/.well-known/` hidden directory.
512
+#
513
+# These types of files usually contain user preferences or the preserved
514
+# state of an utility, and can include rather private places like, for
515
+# example, the `.git` or `.svn` directories.
516
+#
517
+# The `/.well-known/` directory represents the standard (RFC 5785) path
518
+# prefix for "well-known locations" (e.g.: `/.well-known/manifest.json`,
519
+# `/.well-known/keybase.txt`), and therefore, access to its visible
520
+# content should not be blocked.
521
+#
522
+# https://www.mnot.net/blog/2010/04/07/well-known
523
+# https://tools.ietf.org/html/rfc5785
524
+
525
+<IfModule mod_rewrite.c>
526
+    RewriteEngine On
527
+    RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
528
+    RewriteCond %{SCRIPT_FILENAME} -d [OR]
529
+    RewriteCond %{SCRIPT_FILENAME} -f
530
+    RewriteRule "(^|/)\." - [F]
531
+</IfModule>
532
+
533
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
534
+
535
+# Block access to files that can expose sensitive information.
536
+#
537
+# By default, block access to backup and source files that may be
538
+# left by some text editors and can pose a security risk when anyone
539
+# has access to them.
540
+#
541
+# http://feross.org/cmsploit/
542
+#
543
+# (!) Update the `<FilesMatch>` regular expression from below to
544
+# include any files that might end up on your production server and
545
+# can expose sensitive information about your website. These files may
546
+# include: configuration files, files that contain metadata about the
547
+# project (e.g.: project dependencies), build scripts, etc..
548
+
549
+<FilesMatch "(^#.*#|\.(bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$">
550
+
551
+    # Apache < 2.3
552
+    <IfModule !mod_authz_core.c>
553
+        Order allow,deny
554
+        Deny from all
555
+        Satisfy All
556
+    </IfModule>
557
+
558
+    # Apache ≥ 2.3
559
+    <IfModule mod_authz_core.c>
560
+        Require all denied
561
+    </IfModule>
562
+
563
+</FilesMatch>
564
+
565
+# ----------------------------------------------------------------------
566
+# | HTTP Strict Transport Security (HSTS)                              |
567
+# ----------------------------------------------------------------------
568
+
569
+# Force client-side SSL redirection.
570
+#
571
+# If a user types `example.com` in their browser, even if the server
572
+# redirects them to the secure version of the website, that still leaves
573
+# a window of opportunity (the initial HTTP connection) for an attacker
574
+# to downgrade or redirect the request.
575
+#
576
+# The following header ensures that browser will ONLY connect to your
577
+# server via HTTPS, regardless of what the users type in the browser's
578
+# address bar.
579
+#
580
+# (!) Remove the `includeSubDomains` optional directive if the website's
581
+# subdomains are not using HTTPS.
582
+#
583
+# http://www.html5rocks.com/en/tutorials/security/transport-layer-security/
584
+# https://tools.ietf.org/html/draft-ietf-websec-strict-transport-sec-14#section-6.1
585
+# http://blogs.msdn.com/b/ieinternals/archive/2014/08/18/hsts-strict-transport-security-attacks-mitigations-deployment-https.aspx
586
+
587
+# <IfModule mod_headers.c>
588
+#     Header always set Strict-Transport-Security "max-age=16070400; includeSubDomains"
589
+# </IfModule>
590
+
591
+# ----------------------------------------------------------------------
592
+# | Reducing MIME type security risks                                  |
593
+# ----------------------------------------------------------------------
594
+
595
+# Prevent some browsers from MIME-sniffing the response.
596
+#
597
+# This reduces exposure to drive-by download attacks and cross-origin
598
+# data leaks, and should be left uncommented, especially if the server
599
+# is serving user-uploaded content or content that could potentially be
600
+# treated as executable by the browser.
601
+#
602
+# http://www.slideshare.net/hasegawayosuke/owasp-hasegawa
603
+# http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx
604
+# https://msdn.microsoft.com/en-us/library/ie/gg622941.aspx
605
+# https://mimesniff.spec.whatwg.org/
606
+
607
+<IfModule mod_headers.c>
608
+    Header set X-Content-Type-Options "nosniff"
609
+</IfModule>
610
+
611
+# ----------------------------------------------------------------------
612
+# | Reflected Cross-Site Scripting (XSS) attacks                       |
613
+# ----------------------------------------------------------------------
614
+
615
+# (1) Try to re-enable the cross-site scripting (XSS) filter built
616
+#     into most web browsers.
617
+#
618
+#     The filter is usually enabled by default, but in some cases it
619
+#     may be disabled by the user. However, in Internet Explorer for
620
+#     example, it can be re-enabled just by sending the
621
+#     `X-XSS-Protection` header with the value of `1`.
622
+#
623
+# (2) Prevent web browsers from rendering the web page if a potential
624
+#     reflected (a.k.a non-persistent) XSS attack is detected by the
625
+#     filter.
626
+#
627
+#     By default, if the filter is enabled and browsers detect a
628
+#     reflected XSS attack, they will attempt to block the attack
629
+#     by making the smallest possible modifications to the returned
630
+#     web page.
631
+#
632
+#     Unfortunately, in some browsers (e.g.: Internet Explorer),
633
+#     this default behavior may allow the XSS filter to be exploited,
634
+#     thereby, it's better to inform browsers to prevent the rendering
635
+#     of the page altogether, instead of attempting to modify it.
636
+#
637
+#     https://hackademix.net/2009/11/21/ies-xss-filter-creates-xss-vulnerabilities
638
+#
639
+# (!) Do not rely on the XSS filter to prevent XSS attacks! Ensure that
640
+#     you are taking all possible measures to prevent XSS attacks, the
641
+#     most obvious being: validating and sanitizing your website's inputs.
642
+#
643
+# http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-iv-the-xss-filter.aspx
644
+# http://blogs.msdn.com/b/ieinternals/archive/2011/01/31/controlling-the-internet-explorer-xss-filter-with-the-x-xss-protection-http-header.aspx
645
+# https://www.owasp.org/index.php/Cross-site_Scripting_%28XSS%29
646
+
647
+# <IfModule mod_headers.c>
648
+
649
+#     #                           (1)    (2)
650
+#     Header set X-XSS-Protection "1; mode=block"
651
+
652
+#     # `mod_headers` cannot match based on the content-type, however,
653
+#     # the `X-XSS-Protection` response header should be send only for
654
+#     # HTML documents and not for the other resources.
655
+
656
+#     <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|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)$">
657
+#         Header unset X-XSS-Protection
658
+#     </FilesMatch>
659
+
660
+# </IfModule>
661
+
662
+# ----------------------------------------------------------------------
663
+# | Server-side technology information                                 |
664
+# ----------------------------------------------------------------------
665
+
666
+# Remove the `X-Powered-By` response header that:
667
+#
668
+#  * is set by some frameworks and server-side languages
669
+#    (e.g.: ASP.NET, PHP), and its value contains information
670
+#    about them (e.g.: their name, version number)
671
+#
672
+#  * doesn't provide any value as far as users are concern,
673
+#    and in some cases, the information provided by it can
674
+#    be used by attackers
675
+#
676
+# (!) If you can, you should disable the `X-Powered-By` header from the
677
+# language / framework level (e.g.: for PHP, you can do that by setting
678
+# `expose_php = off` in `php.ini`)
679
+#
680
+# https://php.net/manual/en/ini.core.php#ini.expose-php
681
+
682
+<IfModule mod_headers.c>
683
+    Header unset X-Powered-By
684
+</IfModule>
685
+
686
+# ----------------------------------------------------------------------
687
+# | Server software information                                        |
688
+# ----------------------------------------------------------------------
689
+
690
+# Prevent Apache from adding a trailing footer line containing
691
+# information about the server to the server-generated documents
692
+# (e.g.: error messages, directory listings, etc.)
693
+#
694
+# https://httpd.apache.org/docs/current/mod/core.html#serversignature
695
+
696
+ServerSignature Off
697
+
698
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
699
+
700
+# Prevent Apache from sending in the `Server` response header its
701
+# exact version number, the description of the generic OS-type or
702
+# information about its compiled-in modules.
703
+#
704
+# (!) The `ServerTokens` directive will only work in the main server
705
+# configuration file, so don't try to enable it in the `.htaccess` file!
706
+#
707
+# https://httpd.apache.org/docs/current/mod/core.html#servertokens
708
+
709
+#ServerTokens Prod
710
+
711
+
712
+# ######################################################################
713
+# # WEB PERFORMANCE                                                    #
714
+# ######################################################################
715
+
716
+# ----------------------------------------------------------------------
717
+# | Compression                                                        |
718
+# ----------------------------------------------------------------------
719
+
720
+<IfModule mod_deflate.c>
721
+
722
+    # Force compression for mangled `Accept-Encoding` request headers
723
+    # https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html
724
+
725
+    <IfModule mod_setenvif.c>
726
+        <IfModule mod_headers.c>
727
+            SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
728
+            RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
729
+        </IfModule>
730
+    </IfModule>
731
+
732
+    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
733
+
734
+    # Compress all output labeled with one of the following media types.
735
+    #
736
+    # (!) For Apache versions below version 2.3.7 you don't need to
737
+    # enable `mod_filter` and can remove the `<IfModule mod_filter.c>`
738
+    # and `</IfModule>` lines as `AddOutputFilterByType` is still in
739
+    # the core directives.
740
+    #
741
+    # https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
742
+
743
+    <IfModule mod_filter.c>
744
+        AddOutputFilterByType DEFLATE "application/atom+xml" \
745
+                                      "application/javascript" \
746
+                                      "application/json" \
747
+                                      "application/ld+json" \
748
+                                      "application/manifest+json" \
749
+                                      "application/rdf+xml" \
750
+                                      "application/rss+xml" \
751
+                                      "application/schema+json" \
752
+                                      "application/vnd.geo+json" \
753
+                                      "application/vnd.ms-fontobject" \
754
+                                      "application/x-font-ttf" \
755
+                                      "application/x-javascript" \
756
+                                      "application/x-web-app-manifest+json" \
757
+                                      "application/xhtml+xml" \
758
+                                      "application/xml" \
759
+                                      "font/eot" \
760
+                                      "font/opentype" \
761
+                                      "image/bmp" \
762
+                                      "image/svg+xml" \
763
+                                      "image/vnd.microsoft.icon" \
764
+                                      "image/x-icon" \
765
+                                      "text/cache-manifest" \
766
+                                      "text/css" \
767
+                                      "text/html" \
768
+                                      "text/javascript" \
769
+                                      "text/plain" \
770
+                                      "text/vcard" \
771
+                                      "text/vnd.rim.location.xloc" \
772
+                                      "text/vtt" \
773
+                                      "text/x-component" \
774
+                                      "text/x-cross-domain-policy" \
775
+                                      "text/xml"
776
+
777
+    </IfModule>
778
+
779
+    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
780
+
781
+    # Map the following filename extensions to the specified
782
+    # encoding type in order to make Apache serve the file types
783
+    # with the appropriate `Content-Encoding` response header
784
+    # (do note that this will NOT make Apache compress them!).
785
+    #
786
+    # If these files types would be served without an appropriate
787
+    # `Content-Enable` response header, client applications (e.g.:
788
+    # browsers) wouldn't know that they first need to uncompress
789
+    # the response, and thus, wouldn't be able to understand the
790
+    # content.
791
+    #
792
+    # https://httpd.apache.org/docs/current/mod/mod_mime.html#addencoding
793
+
794
+    <IfModule mod_mime.c>
795
+        AddEncoding gzip              svgz
796
+    </IfModule>
797
+
798
+</IfModule>
799
+
800
+# ----------------------------------------------------------------------
801
+# | Content transformation                                             |
802
+# ----------------------------------------------------------------------
803
+
804
+# Prevent intermediate caches or proxies (e.g.: such as the ones
805
+# used by mobile network providers) from modifying the website's
806
+# content.
807
+#
808
+# https://tools.ietf.org/html/rfc2616#section-14.9.5
809
+#
810
+# (!) If you are using `mod_pagespeed`, please note that setting
811
+# the `Cache-Control: no-transform` response header will prevent
812
+# `PageSpeed` from rewriting `HTML` files, and, if the
813
+# `ModPagespeedDisableRewriteOnNoTransform` directive isn't set
814
+# to `off`, also from rewriting other resources.
815
+#
816
+# https://developers.google.com/speed/pagespeed/module/configuration#notransform
817
+
818
+# <IfModule mod_headers.c>
819
+#     Header merge Cache-Control "no-transform"
820
+# </IfModule>
821
+
822
+# ----------------------------------------------------------------------
823
+# | ETags                                                              |
824
+# ----------------------------------------------------------------------
825
+
826
+# Remove `ETags` as resources are sent with far-future expires headers.
827
+#
828
+# https://developer.yahoo.com/performance/rules.html#etags
829
+# https://tools.ietf.org/html/rfc7232#section-2.3
830
+
831
+# `FileETag None` doesn't work in all cases.
832
+<IfModule mod_headers.c>
833
+    Header unset ETag
834
+</IfModule>
835
+
836
+FileETag None
837
+
838
+# ----------------------------------------------------------------------
839
+# | Expires headers                                                    |
840
+# ----------------------------------------------------------------------
841
+
842
+# Serve resources with far-future expires headers.
843
+#
844
+# (!) If you don't control versioning with filename-based
845
+# cache busting, you should consider lowering the cache times
846
+# to something like one week.
847
+#
848
+# https://httpd.apache.org/docs/current/mod/mod_expires.html
849
+
850
+<IfModule mod_expires.c>
851
+
852
+    ExpiresActive on
853
+    ExpiresDefault                                      "access plus 1 month"
854
+
855
+  # CSS
856
+
857
+    ExpiresByType text/css                              "access plus 1 year"
858
+
859
+
860
+  # Data interchange
861
+
862
+    ExpiresByType application/atom+xml                  "access plus 1 hour"
863
+    ExpiresByType application/rdf+xml                   "access plus 1 hour"
864
+    ExpiresByType application/rss+xml                   "access plus 1 hour"
865
+
866
+    ExpiresByType application/json                      "access plus 0 seconds"
867
+    ExpiresByType application/ld+json                   "access plus 0 seconds"
868
+    ExpiresByType application/schema+json               "access plus 0 seconds"
869
+    ExpiresByType application/vnd.geo+json              "access plus 0 seconds"
870
+    ExpiresByType application/xml                       "access plus 0 seconds"
871
+    ExpiresByType text/xml                              "access plus 0 seconds"
872
+
873
+
874
+  # Favicon (cannot be renamed!) and cursor images
875
+
876
+    ExpiresByType image/vnd.microsoft.icon              "access plus 1 week"
877
+    ExpiresByType image/x-icon                          "access plus 1 week"
878
+
879
+  # HTML
880
+
881
+    ExpiresByType text/html                             "access plus 0 seconds"
882
+
883
+
884
+  # JavaScript
885
+
886
+    ExpiresByType application/javascript                "access plus 1 year"
887
+    ExpiresByType application/x-javascript              "access plus 1 year"
888
+    ExpiresByType text/javascript                       "access plus 1 year"
889
+
890
+
891
+  # Manifest files
892
+
893
+    ExpiresByType application/manifest+json             "access plus 1 week"
894
+    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
895
+    ExpiresByType text/cache-manifest                   "access plus 0 seconds"
896
+
897
+
898
+  # Media files
899
+
900
+    ExpiresByType audio/ogg                             "access plus 1 month"
901
+    ExpiresByType image/bmp                             "access plus 1 month"
902
+    ExpiresByType image/gif                             "access plus 1 month"
903
+    ExpiresByType image/jpeg                            "access plus 1 month"
904
+    ExpiresByType image/png                             "access plus 1 month"
905
+    ExpiresByType image/svg+xml                         "access plus 1 month"
906
+    ExpiresByType image/webp                            "access plus 1 month"
907
+    ExpiresByType video/mp4                             "access plus 1 month"
908
+    ExpiresByType video/ogg                             "access plus 1 month"
909
+    ExpiresByType video/webm                            "access plus 1 month"
910
+
911
+
912
+  # Web fonts
913
+
914
+    # Embedded OpenType (EOT)
915
+    ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
916
+    ExpiresByType font/eot                              "access plus 1 month"
917
+
918
+    # OpenType
919
+    ExpiresByType font/opentype                         "access plus 1 month"
920
+
921
+    # TrueType
922
+    ExpiresByType application/x-font-ttf                "access plus 1 month"
923
+
924
+    # Web Open Font Format (WOFF) 1.0
925
+    ExpiresByType application/font-woff                 "access plus 1 month"
926
+    ExpiresByType application/x-font-woff               "access plus 1 month"
927
+    ExpiresByType font/woff                             "access plus 1 month"
928
+
929
+    # Web Open Font Format (WOFF) 2.0
930
+    ExpiresByType application/font-woff2                "access plus 1 month"
931
+
932
+
933
+  # Other
934
+
935
+    ExpiresByType text/x-cross-domain-policy            "access plus 1 week"
936
+
937
+</IfModule>
938
+
939
+# ----------------------------------------------------------------------
940
+# | File concatenation                                                 |
941
+# ----------------------------------------------------------------------
942
+
943
+# Allow concatenation from within specific files.
944
+#
945
+# e.g.:
946
+#
947
+#   If you have the following lines in a file called, for
948
+#   example, `main.combined.js`:
949
+#
950
+#       <!--#include file="js/jquery.js" -->
951
+#       <!--#include file="js/jquery.timer.js" -->
952
+#
953
+#   Apache will replace those lines with the content of the
954
+#   specified files.
955
+
956
+# <IfModule mod_include.c>
957
+#     <FilesMatch "\.combined\.js$">
958
+#         Options +Includes
959
+#         AddOutputFilterByType INCLUDES application/javascript \
960
+#                                        application/x-javascript \
961
+#                                        text/javascript
962
+#         SetOutputFilter INCLUDES
963
+#     </FilesMatch>
964
+#     <FilesMatch "\.combined\.css$">
965
+#         Options +Includes
966
+#         AddOutputFilterByType INCLUDES text/css
967
+#         SetOutputFilter INCLUDES
968
+#     </FilesMatch>
969
+# </IfModule>
970
+
971
+# ----------------------------------------------------------------------
972
+# | Filename-based cache busting                                       |
973
+# ----------------------------------------------------------------------
974
+
975
+# If you're not using a build process to manage your filename version
976
+# revving, you might want to consider enabling the following directives
977
+# to route all requests such as `/style.12345.css` to `/style.css`.
978
+#
979
+# To understand why this is important and even a better solution than
980
+# using something like `*.css?v231`, please see:
981
+# http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
982
+
983
+# <IfModule mod_rewrite.c>
984
+#     RewriteEngine On
985
+#     RewriteCond %{REQUEST_FILENAME} !-f
986
+#     RewriteRule ^(.+)\.(\d+)\.(bmp|css|cur|gif|ico|jpe?g|js|png|svgz?|webp|webmanifest)$ $1.$3 [L]
987
+# </IfModule>