structrdfal 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +133 -0
- data/_includes/blogList.html +82 -0
- data/_includes/blogList.html~1 +100 -0
- data/_includes/blogList.html~2 +85 -0
- data/_includes/catag-old.html +15 -0
- data/_includes/catag.html +16 -0
- data/_includes/footer.html +18 -0
- data/_includes/nav.html +14 -0
- data/_layouts/aboutPage.html +5 -0
- data/_layouts/autopage_category.html +11 -0
- data/_layouts/autopage_tags.html +12 -0
- data/_layouts/bloghome.html +10 -0
- data/_layouts/contactPage.html +5 -0
- data/_layouts/default.html +131 -0
- data/_layouts/event.html +145 -0
- data/_layouts/page.html +4 -0
- data/_layouts/post.html +34 -0
- data/_layouts/sitehome.html +62 -0
- data/_sass/_variables.scss +36 -0
- data/_sass/_vertical-rhythm.scss +61 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/404.html +60 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/LICENSE.txt +19 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/docs/TOC.md +34 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/docs/css.md +54 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/docs/extend.md +640 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/docs/faq.md +42 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/docs/html.md +198 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/docs/js.md +36 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/docs/misc.md +173 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/docs/usage.md +130 -0
- data/assets/.colophon/html5-boilerplate_v7.0.1/index.html +41 -0
- data/assets/.colophon/normalize-scss/README.md +158 -0
- data/assets/.editorconfig +13 -0
- data/assets/.htaccess +1224 -0
- data/assets/404.html +6 -0
- data/assets/browserconfig.xml +12 -0
- data/assets/contactform.html +23 -0
- data/assets/eventform.html +110 -0
- data/assets/favicon.ico +0 -0
- data/assets/humans.txt +16 -0
- data/assets/icon.png +0 -0
- data/assets/robots.txt +5 -0
- data/assets/scripts/.DS_Store +0 -0
- data/assets/scripts/main.js +0 -0
- data/assets/scripts/plugins.js +24 -0
- data/assets/scripts/vendor/jquery-3.3.1.min.js +2 -0
- data/assets/scripts/vendor/modernizr-3.6.0.min.js +3 -0
- data/assets/site.webmanifest +12 -0
- data/assets/styles/HTML5BP-main.css +290 -0
- data/assets/styles/form.css +81 -0
- data/assets/styles/normalize.css +349 -0
- data/assets/styles/structRDFaL.css +177 -0
- data/assets/tile-wide.png +0 -0
- data/assets/tile.png +0 -0
- metadata +156 -0
data/assets/.htaccess
ADDED
@@ -0,0 +1,1224 @@
|
|
1
|
+
# Apache Server Configs v3.1.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
|
+
# https://enable-cors.org/
|
22
|
+
# https://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
|
+
# https://developers.google.com/fonts/docs/troubleshooting
|
53
|
+
|
54
|
+
<IfModule mod_headers.c>
|
55
|
+
<FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
|
56
|
+
Header set Access-Control-Allow-Origin "*"
|
57
|
+
</FilesMatch>
|
58
|
+
</IfModule>
|
59
|
+
|
60
|
+
# ----------------------------------------------------------------------
|
61
|
+
# | Cross-origin resource timing |
|
62
|
+
# ----------------------------------------------------------------------
|
63
|
+
|
64
|
+
# Allow cross-origin access to the timing information for all resources.
|
65
|
+
#
|
66
|
+
# If a resource isn't served with a `Timing-Allow-Origin` header that
|
67
|
+
# would allow its timing information to be shared with the document,
|
68
|
+
# some of the attributes of the `PerformanceResourceTiming` object will
|
69
|
+
# be set to zero.
|
70
|
+
#
|
71
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Timing-Allow-Origin
|
72
|
+
# https://www.w3.org/TR/resource-timing/
|
73
|
+
# https://www.stevesouders.com/blog/2014/08/21/resource-timing-practical-tips/
|
74
|
+
|
75
|
+
# <IfModule mod_headers.c>
|
76
|
+
# Header set Timing-Allow-Origin: "*"
|
77
|
+
# </IfModule>
|
78
|
+
|
79
|
+
# ######################################################################
|
80
|
+
# # ERRORS #
|
81
|
+
# ######################################################################
|
82
|
+
|
83
|
+
# ----------------------------------------------------------------------
|
84
|
+
# | Custom error messages/pages |
|
85
|
+
# ----------------------------------------------------------------------
|
86
|
+
|
87
|
+
# Customize what Apache returns to the client in case of an error.
|
88
|
+
#
|
89
|
+
# https://httpd.apache.org/docs/current/mod/core.html#errordocument
|
90
|
+
|
91
|
+
ErrorDocument 404 /404.html
|
92
|
+
|
93
|
+
# ----------------------------------------------------------------------
|
94
|
+
# | Error prevention |
|
95
|
+
# ----------------------------------------------------------------------
|
96
|
+
|
97
|
+
# Disable the pattern matching based on filenames.
|
98
|
+
#
|
99
|
+
# This setting prevents Apache from returning a 404 error as the result
|
100
|
+
# of a rewrite when the directory with the same name does not exist.
|
101
|
+
#
|
102
|
+
# https://httpd.apache.org/docs/current/content-negotiation.html#multiviews
|
103
|
+
|
104
|
+
Options -MultiViews
|
105
|
+
|
106
|
+
# ######################################################################
|
107
|
+
# # INTERNET EXPLORER #
|
108
|
+
# ######################################################################
|
109
|
+
|
110
|
+
# ----------------------------------------------------------------------
|
111
|
+
# | Document modes |
|
112
|
+
# ----------------------------------------------------------------------
|
113
|
+
|
114
|
+
# Force Internet Explorer 8/9/10 to render pages in the highest mode
|
115
|
+
# available in the various cases when it may not.
|
116
|
+
#
|
117
|
+
# https://hsivonen.fi/doctype/#ie8
|
118
|
+
#
|
119
|
+
# (!) Starting with Internet Explorer 11, document modes are deprecated.
|
120
|
+
# If your business still relies on older web apps and services that were
|
121
|
+
# designed for older versions of Internet Explorer, you might want to
|
122
|
+
# consider enabling `Enterprise Mode` throughout your company.
|
123
|
+
#
|
124
|
+
# https://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode
|
125
|
+
# https://blogs.msdn.microsoft.com/ie/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11/
|
126
|
+
# https://msdn.microsoft.com/en-us/library/ff955275.aspx
|
127
|
+
|
128
|
+
<IfModule mod_headers.c>
|
129
|
+
|
130
|
+
Header set X-UA-Compatible "IE=edge"
|
131
|
+
|
132
|
+
# `mod_headers` cannot match based on the content-type, however,
|
133
|
+
# the `X-UA-Compatible` response header should be sent only for
|
134
|
+
# HTML documents and not for the other resources.
|
135
|
+
|
136
|
+
<FilesMatch "\.(appcache|atom|bbaw|bmp|br|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|gz|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|wasm|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
|
137
|
+
Header unset X-UA-Compatible
|
138
|
+
</FilesMatch>
|
139
|
+
|
140
|
+
</IfModule>
|
141
|
+
|
142
|
+
# ######################################################################
|
143
|
+
# # MEDIA TYPES AND CHARACTER ENCODINGS #
|
144
|
+
# ######################################################################
|
145
|
+
|
146
|
+
# ----------------------------------------------------------------------
|
147
|
+
# | Media types |
|
148
|
+
# ----------------------------------------------------------------------
|
149
|
+
|
150
|
+
# Serve resources with the proper media types (f.k.a. MIME types).
|
151
|
+
#
|
152
|
+
# https://www.iana.org/assignments/media-types/media-types.xhtml
|
153
|
+
# https://httpd.apache.org/docs/current/mod/mod_mime.html#addtype
|
154
|
+
|
155
|
+
<IfModule mod_mime.c>
|
156
|
+
|
157
|
+
# Data interchange
|
158
|
+
|
159
|
+
AddType application/atom+xml atom
|
160
|
+
AddType application/json json map topojson
|
161
|
+
AddType application/ld+json jsonld
|
162
|
+
AddType application/rss+xml rss
|
163
|
+
AddType application/vnd.geo+json geojson
|
164
|
+
AddType application/xml rdf xml
|
165
|
+
|
166
|
+
|
167
|
+
# JavaScript
|
168
|
+
|
169
|
+
# Servers should use text/javascript for JavaScript resources.
|
170
|
+
# https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages
|
171
|
+
|
172
|
+
AddType text/javascript js mjs
|
173
|
+
|
174
|
+
|
175
|
+
# Manifest files
|
176
|
+
|
177
|
+
AddType application/manifest+json webmanifest
|
178
|
+
AddType application/x-web-app-manifest+json webapp
|
179
|
+
AddType text/cache-manifest appcache
|
180
|
+
|
181
|
+
|
182
|
+
# Media files
|
183
|
+
|
184
|
+
AddType audio/mp4 f4a f4b m4a
|
185
|
+
AddType audio/ogg oga ogg opus
|
186
|
+
AddType image/bmp bmp
|
187
|
+
AddType image/svg+xml svg svgz
|
188
|
+
AddType image/webp webp
|
189
|
+
AddType video/mp4 f4v f4p m4v mp4
|
190
|
+
AddType video/ogg ogv
|
191
|
+
AddType video/webm webm
|
192
|
+
AddType video/x-flv flv
|
193
|
+
|
194
|
+
# Serving `.ico` image files with a different media type
|
195
|
+
# prevents Internet Explorer from displaying them as images:
|
196
|
+
# https://github.com/h5bp/html5-boilerplate/commit/37b5fec090d00f38de64b591bcddcb205aadf8ee
|
197
|
+
|
198
|
+
AddType image/x-icon cur ico
|
199
|
+
|
200
|
+
|
201
|
+
# WebAssembly
|
202
|
+
|
203
|
+
AddType application/wasm wasm
|
204
|
+
|
205
|
+
|
206
|
+
# Web fonts
|
207
|
+
|
208
|
+
AddType font/woff woff
|
209
|
+
AddType font/woff2 woff2
|
210
|
+
AddType application/vnd.ms-fontobject eot
|
211
|
+
AddType font/ttf ttf
|
212
|
+
AddType font/collection ttc
|
213
|
+
AddType font/otf otf
|
214
|
+
|
215
|
+
|
216
|
+
# Other
|
217
|
+
|
218
|
+
AddType application/octet-stream safariextz
|
219
|
+
AddType application/x-bb-appworld bbaw
|
220
|
+
AddType application/x-chrome-extension crx
|
221
|
+
AddType application/x-opera-extension oex
|
222
|
+
AddType application/x-xpinstall xpi
|
223
|
+
AddType text/calendar ics
|
224
|
+
AddType text/markdown markdown md
|
225
|
+
AddType text/vcard vcard vcf
|
226
|
+
AddType text/vnd.rim.location.xloc xloc
|
227
|
+
AddType text/vtt vtt
|
228
|
+
AddType text/x-component htc
|
229
|
+
|
230
|
+
</IfModule>
|
231
|
+
|
232
|
+
# ----------------------------------------------------------------------
|
233
|
+
# | Character encodings |
|
234
|
+
# ----------------------------------------------------------------------
|
235
|
+
|
236
|
+
# Serve all resources labeled as `text/html` or `text/plain`
|
237
|
+
# with the media type `charset` parameter set to `UTF-8`.
|
238
|
+
#
|
239
|
+
# https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset
|
240
|
+
|
241
|
+
AddDefaultCharset utf-8
|
242
|
+
|
243
|
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
244
|
+
|
245
|
+
# Serve the following file types with the media type `charset`
|
246
|
+
# parameter set to `UTF-8`.
|
247
|
+
#
|
248
|
+
# https://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset
|
249
|
+
|
250
|
+
<IfModule mod_mime.c>
|
251
|
+
AddCharset utf-8 .atom \
|
252
|
+
.bbaw \
|
253
|
+
.css \
|
254
|
+
.geojson \
|
255
|
+
.ics \
|
256
|
+
.js \
|
257
|
+
.json \
|
258
|
+
.jsonld \
|
259
|
+
.manifest \
|
260
|
+
.markdown \
|
261
|
+
.md \
|
262
|
+
.mjs \
|
263
|
+
.rdf \
|
264
|
+
.rss \
|
265
|
+
.topojson \
|
266
|
+
.vtt \
|
267
|
+
.webapp \
|
268
|
+
.webmanifest \
|
269
|
+
.xloc \
|
270
|
+
.xml
|
271
|
+
</IfModule>
|
272
|
+
|
273
|
+
# ######################################################################
|
274
|
+
# # REWRITES #
|
275
|
+
# ######################################################################
|
276
|
+
|
277
|
+
# ----------------------------------------------------------------------
|
278
|
+
# | Rewrite engine |
|
279
|
+
# ----------------------------------------------------------------------
|
280
|
+
|
281
|
+
# (1) Turn on the rewrite engine (this is necessary in order for
|
282
|
+
# the `RewriteRule` directives to work).
|
283
|
+
#
|
284
|
+
# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteEngine
|
285
|
+
#
|
286
|
+
# (2) Enable the `FollowSymLinks` option if it isn't already.
|
287
|
+
#
|
288
|
+
# https://httpd.apache.org/docs/current/mod/core.html#options
|
289
|
+
#
|
290
|
+
# (3) If your web host doesn't allow the `FollowSymlinks` option,
|
291
|
+
# you need to comment it out or remove it, and then uncomment
|
292
|
+
# the `Options +SymLinksIfOwnerMatch` line (4), but be aware
|
293
|
+
# of the performance impact.
|
294
|
+
#
|
295
|
+
# https://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks
|
296
|
+
#
|
297
|
+
# (4) Some cloud hosting services will require you set `RewriteBase`.
|
298
|
+
#
|
299
|
+
# https://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-modrewrite-not-working-on-my-site
|
300
|
+
# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
|
301
|
+
#
|
302
|
+
# (5) Depending on how your server is set up, you may also need to
|
303
|
+
# use the `RewriteOptions` directive to enable some options for
|
304
|
+
# the rewrite engine.
|
305
|
+
#
|
306
|
+
# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions
|
307
|
+
#
|
308
|
+
# (6) Set %{ENV:PROTO} variable, to allow rewrites to redirect with the
|
309
|
+
# appropriate schema automatically (http or https).
|
310
|
+
|
311
|
+
<IfModule mod_rewrite.c>
|
312
|
+
|
313
|
+
# (1)
|
314
|
+
RewriteEngine On
|
315
|
+
|
316
|
+
# (2)
|
317
|
+
Options +FollowSymlinks
|
318
|
+
|
319
|
+
# (3)
|
320
|
+
# Options +SymLinksIfOwnerMatch
|
321
|
+
|
322
|
+
# (4)
|
323
|
+
# RewriteBase /
|
324
|
+
|
325
|
+
# (5)
|
326
|
+
# RewriteOptions <options>
|
327
|
+
|
328
|
+
# (6)
|
329
|
+
RewriteCond %{HTTPS} =on
|
330
|
+
RewriteRule ^ - [env=proto:https]
|
331
|
+
RewriteCond %{HTTPS} !=on
|
332
|
+
RewriteRule ^ - [env=proto:http]
|
333
|
+
|
334
|
+
</IfModule>
|
335
|
+
|
336
|
+
# ----------------------------------------------------------------------
|
337
|
+
# | Forcing `https://` |
|
338
|
+
# ----------------------------------------------------------------------
|
339
|
+
|
340
|
+
# Redirect from the `http://` to the `https://` version of the URL.
|
341
|
+
#
|
342
|
+
# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
|
343
|
+
|
344
|
+
# (1) If you're using cPanel AutoSSL or the Let's Encrypt webroot
|
345
|
+
# method it will fail to validate the certificate if validation
|
346
|
+
# requests are redirected to HTTPS. Turn on the condition(s)
|
347
|
+
# you need.
|
348
|
+
#
|
349
|
+
# https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml
|
350
|
+
# https://tools.ietf.org/html/draft-ietf-acme-acme-12
|
351
|
+
|
352
|
+
# <IfModule mod_rewrite.c>
|
353
|
+
# RewriteEngine On
|
354
|
+
# RewriteCond %{HTTPS} !=on
|
355
|
+
# # (1)
|
356
|
+
# # RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
|
357
|
+
# # RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[\w-]+$
|
358
|
+
# # RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
|
359
|
+
# RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
360
|
+
# </IfModule>
|
361
|
+
|
362
|
+
# ----------------------------------------------------------------------
|
363
|
+
# | Suppressing the `www.` at the beginning of URLs |
|
364
|
+
# ----------------------------------------------------------------------
|
365
|
+
|
366
|
+
# Rewrite www.example.com → example.com
|
367
|
+
|
368
|
+
# The same content should never be available under two different
|
369
|
+
# URLs, especially not with and without `www.` at the beginning.
|
370
|
+
# This can cause SEO problems (duplicate content), and therefore,
|
371
|
+
# you should choose one of the alternatives and redirect the other
|
372
|
+
# one.
|
373
|
+
#
|
374
|
+
# (!) NEVER USE BOTH WWW-RELATED RULES AT THE SAME TIME!
|
375
|
+
|
376
|
+
# (1) The rule assumes by default that both HTTP and HTTPS
|
377
|
+
# environments are available for redirection.
|
378
|
+
# If your SSL certificate could not handle one of the domains
|
379
|
+
# used during redirection, you should turn the condition on.
|
380
|
+
#
|
381
|
+
# https://github.com/h5bp/server-configs-apache/issues/52
|
382
|
+
|
383
|
+
<IfModule mod_rewrite.c>
|
384
|
+
RewriteEngine On
|
385
|
+
# (1)
|
386
|
+
# RewriteCond %{HTTPS} !=on
|
387
|
+
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
388
|
+
RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301,L]
|
389
|
+
</IfModule>
|
390
|
+
|
391
|
+
# ----------------------------------------------------------------------
|
392
|
+
# | Forcing the `www.` at the beginning of URLs |
|
393
|
+
# ----------------------------------------------------------------------
|
394
|
+
|
395
|
+
# Rewrite example.com → www.example.com
|
396
|
+
|
397
|
+
# The same content should never be available under two different
|
398
|
+
# URLs, especially not with and without `www.` at the beginning.
|
399
|
+
# This can cause SEO problems (duplicate content), and therefore,
|
400
|
+
# you should choose one of the alternatives and redirect the other
|
401
|
+
# one.
|
402
|
+
#
|
403
|
+
# (!) NEVER USE BOTH WWW-RELATED RULES AT THE SAME TIME!
|
404
|
+
|
405
|
+
# (1) The rule assumes by default that both HTTP and HTTPS
|
406
|
+
# environments are available for redirection.
|
407
|
+
# If your SSL certificate could not handle one of the domains
|
408
|
+
# used during redirection, you should turn the condition on.
|
409
|
+
#
|
410
|
+
# https://github.com/h5bp/server-configs-apache/issues/52
|
411
|
+
|
412
|
+
# Be aware that the following might not be a good idea if you use "real"
|
413
|
+
# subdomains for certain parts of your website.
|
414
|
+
|
415
|
+
# <IfModule mod_rewrite.c>
|
416
|
+
# RewriteEngine On
|
417
|
+
# # (1)
|
418
|
+
# # RewriteCond %{HTTPS} !=on
|
419
|
+
# RewriteCond %{HTTP_HOST} !^www\. [NC]
|
420
|
+
# RewriteCond %{SERVER_ADDR} !=127.0.0.1
|
421
|
+
# RewriteCond %{SERVER_ADDR} !=::1
|
422
|
+
# RewriteRule ^ %{ENV:PROTO}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
423
|
+
# </IfModule>
|
424
|
+
|
425
|
+
# ######################################################################
|
426
|
+
# # SECURITY #
|
427
|
+
# ######################################################################
|
428
|
+
|
429
|
+
# ----------------------------------------------------------------------
|
430
|
+
# | Clickjacking |
|
431
|
+
# ----------------------------------------------------------------------
|
432
|
+
|
433
|
+
# Protect website against clickjacking.
|
434
|
+
#
|
435
|
+
# The example below sends the `X-Frame-Options` response header with
|
436
|
+
# the value `DENY`, informing browsers not to display the content of
|
437
|
+
# the web page in any frame.
|
438
|
+
#
|
439
|
+
# This might not be the best setting for everyone. You should read
|
440
|
+
# about the other two possible values the `X-Frame-Options` header
|
441
|
+
# field can have: `SAMEORIGIN` and `ALLOW-FROM`.
|
442
|
+
# https://tools.ietf.org/html/rfc7034#section-2.1.
|
443
|
+
#
|
444
|
+
# Keep in mind that while you could send the `X-Frame-Options` header
|
445
|
+
# for all of your website’s pages, this has the potential downside that
|
446
|
+
# it forbids even non-malicious framing of your content (e.g.: when
|
447
|
+
# users visit your website using a Google Image Search results page).
|
448
|
+
#
|
449
|
+
# Nonetheless, you should ensure that you send the `X-Frame-Options`
|
450
|
+
# header for all pages that allow a user to make a state changing
|
451
|
+
# operation (e.g: pages that contain one-click purchase links, checkout
|
452
|
+
# or bank-transfer confirmation pages, pages that make permanent
|
453
|
+
# configuration changes, etc.).
|
454
|
+
#
|
455
|
+
# Sending the `X-Frame-Options` header can also protect your website
|
456
|
+
# against more than just clickjacking attacks:
|
457
|
+
# https://cure53.de/xfo-clickjacking.pdf.
|
458
|
+
#
|
459
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
|
460
|
+
# https://tools.ietf.org/html/rfc7034
|
461
|
+
# https://blogs.msdn.microsoft.com/ieinternals/2010/03/30/combating-clickjacking-with-x-frame-options/
|
462
|
+
# https://www.owasp.org/index.php/Clickjacking
|
463
|
+
|
464
|
+
# <IfModule mod_headers.c>
|
465
|
+
|
466
|
+
# Header set X-Frame-Options "DENY"
|
467
|
+
|
468
|
+
# # `mod_headers` cannot match based on the content-type, however,
|
469
|
+
# # the `X-Frame-Options` response header should be sent only for
|
470
|
+
# # HTML documents and not for the other resources.
|
471
|
+
|
472
|
+
# <FilesMatch "\.(appcache|atom|bbaw|bmp|br|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|gz|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|wasm|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
|
473
|
+
# Header unset X-Frame-Options
|
474
|
+
# </FilesMatch>
|
475
|
+
|
476
|
+
# </IfModule>
|
477
|
+
|
478
|
+
# ----------------------------------------------------------------------
|
479
|
+
# | Content Security Policy (CSP) |
|
480
|
+
# ----------------------------------------------------------------------
|
481
|
+
|
482
|
+
# Mitigate the risk of cross-site scripting and other content-injection
|
483
|
+
# attacks.
|
484
|
+
#
|
485
|
+
# This can be done by setting a `Content Security Policy` which
|
486
|
+
# whitelists trusted sources of content for your website.
|
487
|
+
#
|
488
|
+
# The example header below allows ONLY scripts that are loaded from
|
489
|
+
# the current website's origin (no inline scripts, no CDN, etc).
|
490
|
+
# That almost certainly won't work as-is for your website!
|
491
|
+
#
|
492
|
+
# To make things easier, you can use an online CSP header generator
|
493
|
+
# such as: https://www.cspisawesome.com/.
|
494
|
+
#
|
495
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
|
496
|
+
# https://www.w3.org/TR/CSP3/
|
497
|
+
# https://content-security-policy.com/
|
498
|
+
# https://www.html5rocks.com/en/tutorials/security/content-security-policy/
|
499
|
+
|
500
|
+
# <IfModule mod_headers.c>
|
501
|
+
|
502
|
+
# Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
|
503
|
+
|
504
|
+
# # `mod_headers` cannot match based on the content-type, however,
|
505
|
+
# # the `Content-Security-Policy` response header should be sent
|
506
|
+
# # only for HTML documents and not for the other resources.
|
507
|
+
|
508
|
+
# <FilesMatch "\.(appcache|atom|bbaw|bmp|br|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|gz|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|wasm|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
|
509
|
+
# Header unset Content-Security-Policy
|
510
|
+
# </FilesMatch>
|
511
|
+
|
512
|
+
# </IfModule>
|
513
|
+
|
514
|
+
# ----------------------------------------------------------------------
|
515
|
+
# | File access |
|
516
|
+
# ----------------------------------------------------------------------
|
517
|
+
|
518
|
+
# Block access to directories without a default document.
|
519
|
+
#
|
520
|
+
# You should leave the following uncommented, as you shouldn't allow
|
521
|
+
# anyone to surf through every directory on your server (which may
|
522
|
+
# includes rather private places such as the CMS's directories).
|
523
|
+
|
524
|
+
<IfModule mod_autoindex.c>
|
525
|
+
Options -Indexes
|
526
|
+
</IfModule>
|
527
|
+
|
528
|
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
529
|
+
|
530
|
+
# Block access to all hidden files and directories with the exception of
|
531
|
+
# the visible content from within the `/.well-known/` hidden directory.
|
532
|
+
#
|
533
|
+
# These types of files usually contain user preferences or the preserved
|
534
|
+
# state of an utility, and can include rather private places like, for
|
535
|
+
# example, the `.git` or `.svn` directories.
|
536
|
+
#
|
537
|
+
# The `/.well-known/` directory represents the standard (RFC 5785) path
|
538
|
+
# prefix for "well-known locations" (e.g.: `/.well-known/manifest.json`,
|
539
|
+
# `/.well-known/keybase.txt`), and therefore, access to its visible
|
540
|
+
# content should not be blocked.
|
541
|
+
#
|
542
|
+
# https://www.mnot.net/blog/2010/04/07/well-known
|
543
|
+
# https://tools.ietf.org/html/rfc5785
|
544
|
+
|
545
|
+
<IfModule mod_rewrite.c>
|
546
|
+
RewriteEngine On
|
547
|
+
RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
|
548
|
+
RewriteCond %{SCRIPT_FILENAME} -d [OR]
|
549
|
+
RewriteCond %{SCRIPT_FILENAME} -f
|
550
|
+
RewriteRule "(^|/)\." - [F]
|
551
|
+
</IfModule>
|
552
|
+
|
553
|
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
554
|
+
|
555
|
+
# Block access to files that can expose sensitive information.
|
556
|
+
#
|
557
|
+
# By default, block access to backup and source files that may be
|
558
|
+
# left by some text editors and can pose a security risk when anyone
|
559
|
+
# has access to them.
|
560
|
+
#
|
561
|
+
# https://feross.org/cmsploit/
|
562
|
+
#
|
563
|
+
# (!) Update the `<FilesMatch>` regular expression from below to
|
564
|
+
# include any files that might end up on your production server and
|
565
|
+
# can expose sensitive information about your website. These files may
|
566
|
+
# include: configuration files, files that contain metadata about the
|
567
|
+
# project (e.g.: project dependencies), build scripts, etc..
|
568
|
+
|
569
|
+
<IfModule mod_authz_core.c>
|
570
|
+
<FilesMatch "(^#.*#|\.(bak|conf|dist|fla|in[ci]|log|orig|psd|sh|sql|sw[op])|~)$">
|
571
|
+
Require all denied
|
572
|
+
</FilesMatch>
|
573
|
+
</IfModule>
|
574
|
+
|
575
|
+
# ----------------------------------------------------------------------
|
576
|
+
# | HTTP Strict Transport Security (HSTS) |
|
577
|
+
# ----------------------------------------------------------------------
|
578
|
+
|
579
|
+
# Force client-side SSL redirection.
|
580
|
+
#
|
581
|
+
# If a user types `example.com` in their browser, even if the server
|
582
|
+
# redirects them to the secure version of the website, that still leaves
|
583
|
+
# a window of opportunity (the initial HTTP connection) for an attacker
|
584
|
+
# to downgrade or redirect the request.
|
585
|
+
#
|
586
|
+
# The following header ensures that browser will ONLY connect to your
|
587
|
+
# server via HTTPS, regardless of what the users type in the browser's
|
588
|
+
# address bar.
|
589
|
+
#
|
590
|
+
# (!) Be aware that this, once published, is not revokable and you must ensure
|
591
|
+
# being able to serve the site via SSL for the duration you've specified
|
592
|
+
# in max-age. When you don't have a valid SSL connection (anymore) your
|
593
|
+
# visitors will see a nasty error message even when attempting to connect
|
594
|
+
# via simple HTTP.
|
595
|
+
#
|
596
|
+
# (!) Remove the `includeSubDomains` optional directive if the website's
|
597
|
+
# subdomains are not using HTTPS.
|
598
|
+
#
|
599
|
+
# (1) If you want to submit your site for HSTS preload (2) you must
|
600
|
+
# * ensure the `includeSubDomains` directive to be present
|
601
|
+
# * the `preload` directive to be specified
|
602
|
+
# * the `max-age` to be at least 31536000 seconds (1 year) according to the current status.
|
603
|
+
#
|
604
|
+
# It is also advised (3) to only serve the HSTS header via a secure connection
|
605
|
+
# which can be done with either `env=https` or `"expr=%{HTTPS} == 'on'"` (4). The
|
606
|
+
# exact way depends on your environment and might just be tried.
|
607
|
+
#
|
608
|
+
# (2) https://hstspreload.org/
|
609
|
+
# (3) https://tools.ietf.org/html/rfc6797#section-7.2
|
610
|
+
# (4) https://stackoverflow.com/questions/24144552/how-to-set-hsts-header-from-htaccess-only-on-https/24145033#comment81632711_24145033
|
611
|
+
#
|
612
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
|
613
|
+
# https://tools.ietf.org/html/rfc6797#section-6.1
|
614
|
+
# https://www.html5rocks.com/en/tutorials/security/transport-layer-security/
|
615
|
+
# https://blogs.msdn.microsoft.com/ieinternals/2014/08/18/strict-transport-security/
|
616
|
+
|
617
|
+
# <IfModule mod_headers.c>
|
618
|
+
# Header always set Strict-Transport-Security "max-age=16070400; includeSubDomains"
|
619
|
+
# # (1) or if HSTS preloading is desired (respect (2) for current requirements):
|
620
|
+
# # Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS
|
621
|
+
# # (4) respectively… (respect (2) for current requirements):
|
622
|
+
# # Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" "expr=%{HTTPS} == 'on'"
|
623
|
+
# </IfModule>
|
624
|
+
|
625
|
+
# ----------------------------------------------------------------------
|
626
|
+
# | Reducing MIME type security risks |
|
627
|
+
# ----------------------------------------------------------------------
|
628
|
+
|
629
|
+
# Prevent some browsers from MIME-sniffing the response.
|
630
|
+
#
|
631
|
+
# This reduces exposure to drive-by download attacks and cross-origin
|
632
|
+
# data leaks, and should be left uncommented, especially if the server
|
633
|
+
# is serving user-uploaded content or content that could potentially be
|
634
|
+
# treated as executable by the browser.
|
635
|
+
#
|
636
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
|
637
|
+
# https://blogs.msdn.microsoft.com/ie/2008/07/02/ie8-security-part-v-comprehensive-protection/
|
638
|
+
# https://mimesniff.spec.whatwg.org/
|
639
|
+
|
640
|
+
<IfModule mod_headers.c>
|
641
|
+
Header set X-Content-Type-Options "nosniff"
|
642
|
+
</IfModule>
|
643
|
+
|
644
|
+
# ----------------------------------------------------------------------
|
645
|
+
# | Reflected Cross-Site Scripting (XSS) attacks |
|
646
|
+
# ----------------------------------------------------------------------
|
647
|
+
|
648
|
+
# (1) Try to re-enable the cross-site scripting (XSS) filter built
|
649
|
+
# into most web browsers.
|
650
|
+
#
|
651
|
+
# The filter is usually enabled by default, but in some cases it
|
652
|
+
# may be disabled by the user. However, in Internet Explorer for
|
653
|
+
# example, it can be re-enabled just by sending the
|
654
|
+
# `X-XSS-Protection` header with the value of `1`.
|
655
|
+
#
|
656
|
+
# (2) Prevent web browsers from rendering the web page if a potential
|
657
|
+
# reflected (a.k.a non-persistent) XSS attack is detected by the
|
658
|
+
# filter.
|
659
|
+
#
|
660
|
+
# By default, if the filter is enabled and browsers detect a
|
661
|
+
# reflected XSS attack, they will attempt to block the attack
|
662
|
+
# by making the smallest possible modifications to the returned
|
663
|
+
# web page.
|
664
|
+
#
|
665
|
+
# Unfortunately, in some browsers (e.g.: Internet Explorer),
|
666
|
+
# this default behavior may allow the XSS filter to be exploited,
|
667
|
+
# thereby, it's better to inform browsers to prevent the rendering
|
668
|
+
# of the page altogether, instead of attempting to modify it.
|
669
|
+
#
|
670
|
+
# https://hackademix.net/2009/11/21/ies-xss-filter-creates-xss-vulnerabilities
|
671
|
+
#
|
672
|
+
# (!) Do not rely on the XSS filter to prevent XSS attacks! Ensure that
|
673
|
+
# you are taking all possible measures to prevent XSS attacks, the
|
674
|
+
# most obvious being: validating and sanitizing your website's inputs.
|
675
|
+
#
|
676
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
|
677
|
+
# https://blogs.msdn.microsoft.com/ie/2008/07/02/ie8-security-part-iv-the-xss-filter/
|
678
|
+
# https://blogs.msdn.microsoft.com/ieinternals/2011/01/31/controlling-the-xss-filter/
|
679
|
+
# https://www.owasp.org/index.php/Cross-site_Scripting_%28XSS%29
|
680
|
+
|
681
|
+
# <IfModule mod_headers.c>
|
682
|
+
|
683
|
+
# # (1) (2)
|
684
|
+
# Header set X-XSS-Protection "1; mode=block"
|
685
|
+
|
686
|
+
# # `mod_headers` cannot match based on the content-type, however,
|
687
|
+
# # the `X-XSS-Protection` response header should be sent only for
|
688
|
+
# # HTML documents and not for the other resources.
|
689
|
+
|
690
|
+
# <FilesMatch "\.(appcache|atom|bbaw|bmp|br|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|gz|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|wasm|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
|
691
|
+
# Header unset X-XSS-Protection
|
692
|
+
# </FilesMatch>
|
693
|
+
|
694
|
+
# </IfModule>
|
695
|
+
|
696
|
+
# ----------------------------------------------------------------------
|
697
|
+
# | Referrer Policy |
|
698
|
+
# ----------------------------------------------------------------------
|
699
|
+
|
700
|
+
# A web application uses HTTPS and a URL-based session identifier.
|
701
|
+
# The web application might wish to link to HTTPS resources on other
|
702
|
+
# web sites without leaking the user's session identifier in the URL.
|
703
|
+
#
|
704
|
+
# This can be done by setting a `Referrer Policy` which
|
705
|
+
# whitelists trusted sources of content for your website.
|
706
|
+
#
|
707
|
+
# To check your referrer policy, you can use an online service
|
708
|
+
# such as: https://securityheaders.io/.
|
709
|
+
#
|
710
|
+
# https://scotthelme.co.uk/a-new-security-header-referrer-policy/
|
711
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
|
712
|
+
|
713
|
+
# <IfModule mod_headers.c>
|
714
|
+
|
715
|
+
# # no-referrer-when-downgrade (default)
|
716
|
+
# # This should be the user agent's default behavior if no policy is
|
717
|
+
# # specified.The origin is sent as referrer to a-priori as-much-secure
|
718
|
+
# # destination (HTTPS->HTTPS), but isn't sent to a less secure destination
|
719
|
+
# # (HTTPS->HTTP).
|
720
|
+
|
721
|
+
# Header set Referrer-Policy "no-referrer-when-downgrade"
|
722
|
+
|
723
|
+
# # `mod_headers` cannot match based on the content-type, however,
|
724
|
+
# # the `Referrer-Policy` response header should be sent
|
725
|
+
# # only for HTML documents and not for the other resources.
|
726
|
+
|
727
|
+
# <FilesMatch "\.(appcache|atom|bbaw|bmp|br|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|gz|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|wasm|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
|
728
|
+
# Header unset Referrer-Policy
|
729
|
+
# </FilesMatch>
|
730
|
+
|
731
|
+
# </IfModule>
|
732
|
+
|
733
|
+
# ----------------------------------------------------------------------
|
734
|
+
# | Disable TRACE HTTP Method |
|
735
|
+
# ----------------------------------------------------------------------
|
736
|
+
|
737
|
+
# Prevent Apache from responding to `TRACE` HTTP request.
|
738
|
+
#
|
739
|
+
# The TRACE method, while apparently harmless, can be successfully
|
740
|
+
# leveraged in some scenarios to steal legitimate users' credentials
|
741
|
+
#
|
742
|
+
# Modern browsers now prevent TRACE requests being made via JavaScript,
|
743
|
+
# however, other ways of sending TRACE requests with browsers have been
|
744
|
+
# discovered, such as using Java.
|
745
|
+
#
|
746
|
+
# (!) The `TraceEnable` directive will only work in the main server
|
747
|
+
# configuration file, so don't try to enable it in the `.htaccess` file!
|
748
|
+
#
|
749
|
+
# https://tools.ietf.org/html/rfc7231#section-4.3.8
|
750
|
+
# https://www.owasp.org/index.php/Cross_Site_Tracing
|
751
|
+
# https://www.owasp.org/index.php/Test_HTTP_Methods_(OTG-CONFIG-006)
|
752
|
+
# https://httpd.apache.org/docs/current/mod/core.html#traceenable
|
753
|
+
|
754
|
+
# TraceEnable Off
|
755
|
+
|
756
|
+
# ----------------------------------------------------------------------
|
757
|
+
# | Server-side technology information |
|
758
|
+
# ----------------------------------------------------------------------
|
759
|
+
|
760
|
+
# Remove the `X-Powered-By` response header that:
|
761
|
+
#
|
762
|
+
# * is set by some frameworks and server-side languages
|
763
|
+
# (e.g.: ASP.NET, PHP), and its value contains information
|
764
|
+
# about them (e.g.: their name, version number)
|
765
|
+
#
|
766
|
+
# * doesn't provide any value to users, contributes to header
|
767
|
+
# bloat, and in some cases, the information it provides can
|
768
|
+
# expose vulnerabilities
|
769
|
+
#
|
770
|
+
# (!) If you can, you should disable the `X-Powered-By` header from the
|
771
|
+
# language / framework level (e.g.: for PHP, you can do that by setting
|
772
|
+
# `expose_php = off` in `php.ini`)
|
773
|
+
#
|
774
|
+
# https://php.net/manual/en/ini.core.php#ini.expose-php
|
775
|
+
|
776
|
+
<IfModule mod_headers.c>
|
777
|
+
Header unset X-Powered-By
|
778
|
+
</IfModule>
|
779
|
+
|
780
|
+
# ----------------------------------------------------------------------
|
781
|
+
# | Server software information |
|
782
|
+
# ----------------------------------------------------------------------
|
783
|
+
|
784
|
+
# Prevent Apache from adding a trailing footer line containing
|
785
|
+
# information about the server to the server-generated documents
|
786
|
+
# (e.g.: error messages, directory listings, etc.)
|
787
|
+
#
|
788
|
+
# https://httpd.apache.org/docs/current/mod/core.html#serversignature
|
789
|
+
|
790
|
+
ServerSignature Off
|
791
|
+
|
792
|
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
793
|
+
|
794
|
+
# Prevent Apache from sending in the `Server` response header its
|
795
|
+
# exact version number, the description of the generic OS-type or
|
796
|
+
# information about its compiled-in modules.
|
797
|
+
#
|
798
|
+
# (!) The `ServerTokens` directive will only work in the main server
|
799
|
+
# configuration file, so don't try to enable it in the `.htaccess` file!
|
800
|
+
#
|
801
|
+
# https://httpd.apache.org/docs/current/mod/core.html#servertokens
|
802
|
+
|
803
|
+
# ServerTokens Prod
|
804
|
+
|
805
|
+
# ######################################################################
|
806
|
+
# # WEB PERFORMANCE #
|
807
|
+
# ######################################################################
|
808
|
+
|
809
|
+
# ----------------------------------------------------------------------
|
810
|
+
# | Compression |
|
811
|
+
# ----------------------------------------------------------------------
|
812
|
+
|
813
|
+
<IfModule mod_deflate.c>
|
814
|
+
|
815
|
+
# Force compression for mangled `Accept-Encoding` request headers
|
816
|
+
#
|
817
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding
|
818
|
+
# https://calendar.perfplanet.com/2010/pushing-beyond-gzipping/
|
819
|
+
|
820
|
+
<IfModule mod_setenvif.c>
|
821
|
+
<IfModule mod_headers.c>
|
822
|
+
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
|
823
|
+
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
|
824
|
+
</IfModule>
|
825
|
+
</IfModule>
|
826
|
+
|
827
|
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
828
|
+
|
829
|
+
# Compress all output labeled with one of the following media types.
|
830
|
+
#
|
831
|
+
# https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
|
832
|
+
|
833
|
+
<IfModule mod_filter.c>
|
834
|
+
AddOutputFilterByType DEFLATE "application/atom+xml" \
|
835
|
+
"application/javascript" \
|
836
|
+
"application/json" \
|
837
|
+
"application/ld+json" \
|
838
|
+
"application/manifest+json" \
|
839
|
+
"application/rdf+xml" \
|
840
|
+
"application/rss+xml" \
|
841
|
+
"application/schema+json" \
|
842
|
+
"application/vnd.geo+json" \
|
843
|
+
"application/vnd.ms-fontobject" \
|
844
|
+
"application/wasm" \
|
845
|
+
"application/x-font-ttf" \
|
846
|
+
"application/x-javascript" \
|
847
|
+
"application/x-web-app-manifest+json" \
|
848
|
+
"application/xhtml+xml" \
|
849
|
+
"application/xml" \
|
850
|
+
"font/collection" \
|
851
|
+
"font/eot" \
|
852
|
+
"font/opentype" \
|
853
|
+
"font/otf" \
|
854
|
+
"font/ttf" \
|
855
|
+
"image/bmp" \
|
856
|
+
"image/svg+xml" \
|
857
|
+
"image/vnd.microsoft.icon" \
|
858
|
+
"image/x-icon" \
|
859
|
+
"text/cache-manifest" \
|
860
|
+
"text/calendar" \
|
861
|
+
"text/css" \
|
862
|
+
"text/html" \
|
863
|
+
"text/javascript" \
|
864
|
+
"text/plain" \
|
865
|
+
"text/markdown" \
|
866
|
+
"text/vcard" \
|
867
|
+
"text/vnd.rim.location.xloc" \
|
868
|
+
"text/vtt" \
|
869
|
+
"text/x-component" \
|
870
|
+
"text/x-cross-domain-policy" \
|
871
|
+
"text/xml"
|
872
|
+
|
873
|
+
</IfModule>
|
874
|
+
|
875
|
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
876
|
+
|
877
|
+
# Map the following filename extensions to the specified
|
878
|
+
# encoding type in order to make Apache serve the file types
|
879
|
+
# with the appropriate `Content-Encoding` response header
|
880
|
+
# (do note that this will NOT make Apache compress them!).
|
881
|
+
#
|
882
|
+
# If these files types would be served without an appropriate
|
883
|
+
# `Content-Enable` response header, client applications (e.g.:
|
884
|
+
# browsers) wouldn't know that they first need to uncompress
|
885
|
+
# the response, and thus, wouldn't be able to understand the
|
886
|
+
# content.
|
887
|
+
#
|
888
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding
|
889
|
+
# https://httpd.apache.org/docs/current/mod/mod_mime.html#addencoding
|
890
|
+
|
891
|
+
<IfModule mod_mime.c>
|
892
|
+
AddEncoding gzip svgz
|
893
|
+
</IfModule>
|
894
|
+
|
895
|
+
</IfModule>
|
896
|
+
|
897
|
+
# ----------------------------------------------------------------------
|
898
|
+
# | Brotli pre-compressed content |
|
899
|
+
# ----------------------------------------------------------------------
|
900
|
+
|
901
|
+
# Serve brotli compressed CSS, JS, HTML, SVG, ICS and JSON files
|
902
|
+
# if they exist and if the client accepts br encoding.
|
903
|
+
#
|
904
|
+
# (!) To make this part relevant, you need to generate encoded
|
905
|
+
# files by your own. Enabling this part will not auto-generate
|
906
|
+
# brotlied files.
|
907
|
+
#
|
908
|
+
# Note that some clients (eg. browsers) require a secure connection
|
909
|
+
# to request brotli-compressed resources.
|
910
|
+
# https://www.chromestatus.com/feature/5420797577396224
|
911
|
+
#
|
912
|
+
# https://httpd.apache.org/docs/current/mod/mod_brotli.html#precompressed
|
913
|
+
|
914
|
+
# <IfModule mod_headers.c>
|
915
|
+
|
916
|
+
# RewriteCond %{HTTP:Accept-Encoding} br
|
917
|
+
# RewriteCond %{REQUEST_FILENAME}\.br -f
|
918
|
+
# RewriteRule \.(css|ics|js|json|html|svg)$ %{REQUEST_URI}.br [L]
|
919
|
+
|
920
|
+
# # Prevent mod_deflate double gzip
|
921
|
+
# RewriteRule \.br$ - [E=no-gzip:1]
|
922
|
+
|
923
|
+
# <FilesMatch "\.br$">
|
924
|
+
|
925
|
+
# <IfModule mod_mime.c>
|
926
|
+
# # Serve correct content types
|
927
|
+
# AddType text/css css.br
|
928
|
+
# AddType text/calendar ics.br
|
929
|
+
# AddType text/javascript js.br
|
930
|
+
# AddType application/json json.br
|
931
|
+
# AddType text/html html.br
|
932
|
+
# AddType image/svg+xml svg.br
|
933
|
+
|
934
|
+
# # Serve correct content charset
|
935
|
+
# AddCharset utf-8 .css.br \
|
936
|
+
# .ics.br \
|
937
|
+
# .js.br \
|
938
|
+
# .json.br
|
939
|
+
# </IfModule>
|
940
|
+
|
941
|
+
# # Force proxies to cache brotlied and non-brotlied files separately
|
942
|
+
# Header append Vary Accept-Encoding
|
943
|
+
|
944
|
+
# </FilesMatch>
|
945
|
+
|
946
|
+
# # Serve correct encoding type
|
947
|
+
# AddEncoding br .br
|
948
|
+
|
949
|
+
# </IfModule>
|
950
|
+
|
951
|
+
# ----------------------------------------------------------------------
|
952
|
+
# | GZip pre-compressed content |
|
953
|
+
# ----------------------------------------------------------------------
|
954
|
+
|
955
|
+
# Serve gzip compressed CSS, JS, HTML, SVG, ICS and JSON files
|
956
|
+
# if they exist and if the client accepts gzip encoding.
|
957
|
+
#
|
958
|
+
# (!) To make this part relevant, you need to generate encoded
|
959
|
+
# files by your own. Enabling this part will not auto-generate
|
960
|
+
# gziped files.
|
961
|
+
#
|
962
|
+
# https://httpd.apache.org/docs/current/mod/mod_deflate.html#precompressed
|
963
|
+
#
|
964
|
+
# (1)
|
965
|
+
# Removing default MIME Type for .gz files allowing to add custom
|
966
|
+
# sub-types.
|
967
|
+
# You may prefer using less generic extensions such as .html_gz in
|
968
|
+
# order to keep default behavior regarding .gz files.
|
969
|
+
# https://httpd.apache.org/docs/current/mod/mod_mime.html#removetype
|
970
|
+
|
971
|
+
# <IfModule mod_headers.c>
|
972
|
+
|
973
|
+
# RewriteCond %{HTTP:Accept-Encoding} gzip
|
974
|
+
# RewriteCond %{REQUEST_FILENAME}\.gz -f
|
975
|
+
# RewriteRule \.(css|ics|js|json|html|svg)$ %{REQUEST_URI}.gz [L]
|
976
|
+
|
977
|
+
# # Prevent mod_deflate double gzip
|
978
|
+
# RewriteRule \.gz$ - [E=no-gzip:1]
|
979
|
+
|
980
|
+
# <FilesMatch "\.gz$">
|
981
|
+
|
982
|
+
# # Serve correct content types
|
983
|
+
# <IfModule mod_mime.c>
|
984
|
+
# # (1)
|
985
|
+
# RemoveType gz
|
986
|
+
|
987
|
+
# # Serve correct content types
|
988
|
+
# AddType text/css css.gz
|
989
|
+
# AddType text/calendar ics.gz
|
990
|
+
# AddType text/javascript js.gz
|
991
|
+
# AddType application/json json.gz
|
992
|
+
# AddType text/html html.gz
|
993
|
+
# AddType image/svg+xml svg.gz
|
994
|
+
|
995
|
+
# # Serve correct content charset
|
996
|
+
# AddCharset utf-8 .css.gz \
|
997
|
+
# .ics.gz \
|
998
|
+
# .js.gz \
|
999
|
+
# .json.gz
|
1000
|
+
# </IfModule>
|
1001
|
+
|
1002
|
+
# # Force proxies to cache gzipped and non-gzipped files separately
|
1003
|
+
# Header append Vary Accept-Encoding
|
1004
|
+
|
1005
|
+
# </FilesMatch>
|
1006
|
+
|
1007
|
+
# # Serve correct encoding type
|
1008
|
+
# AddEncoding gzip .gz
|
1009
|
+
|
1010
|
+
# </IfModule>
|
1011
|
+
|
1012
|
+
# ----------------------------------------------------------------------
|
1013
|
+
# | Content transformation |
|
1014
|
+
# ----------------------------------------------------------------------
|
1015
|
+
|
1016
|
+
# Prevent intermediate caches or proxies (e.g.: such as the ones
|
1017
|
+
# used by mobile network providers) from modifying the website's
|
1018
|
+
# content.
|
1019
|
+
#
|
1020
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
|
1021
|
+
# https://tools.ietf.org/html/rfc2616#section-14.9.5
|
1022
|
+
#
|
1023
|
+
# (!) If you are using `mod_pagespeed`, please note that setting
|
1024
|
+
# the `Cache-Control: no-transform` response header will prevent
|
1025
|
+
# `PageSpeed` from rewriting `HTML` files, and, if the
|
1026
|
+
# `ModPagespeedDisableRewriteOnNoTransform` directive isn't set
|
1027
|
+
# to `off`, also from rewriting other resources.
|
1028
|
+
#
|
1029
|
+
# https://developers.google.com/speed/pagespeed/module/configuration#notransform
|
1030
|
+
|
1031
|
+
# <IfModule mod_headers.c>
|
1032
|
+
# Header merge Cache-Control "no-transform"
|
1033
|
+
# </IfModule>
|
1034
|
+
|
1035
|
+
# ----------------------------------------------------------------------
|
1036
|
+
# | ETags |
|
1037
|
+
# ----------------------------------------------------------------------
|
1038
|
+
|
1039
|
+
# Remove `ETags` as resources are sent with far-future expires headers.
|
1040
|
+
#
|
1041
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
|
1042
|
+
# https://developer.yahoo.com/performance/rules.html#etags
|
1043
|
+
# https://tools.ietf.org/html/rfc7232#section-2.3
|
1044
|
+
|
1045
|
+
# `FileETag None` doesn't work in all cases.
|
1046
|
+
<IfModule mod_headers.c>
|
1047
|
+
Header unset ETag
|
1048
|
+
</IfModule>
|
1049
|
+
|
1050
|
+
FileETag None
|
1051
|
+
|
1052
|
+
# ----------------------------------------------------------------------
|
1053
|
+
# | Cache expiration |
|
1054
|
+
# ----------------------------------------------------------------------
|
1055
|
+
|
1056
|
+
# Serve resources with far-future expiration date.
|
1057
|
+
#
|
1058
|
+
# (!) If you don't control versioning with filename-based
|
1059
|
+
# cache busting, you should consider lowering the cache times
|
1060
|
+
# to something like one week.
|
1061
|
+
#
|
1062
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
|
1063
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires
|
1064
|
+
# https://httpd.apache.org/docs/current/mod/mod_expires.html
|
1065
|
+
|
1066
|
+
<IfModule mod_expires.c>
|
1067
|
+
|
1068
|
+
ExpiresActive on
|
1069
|
+
ExpiresDefault "access plus 1 month"
|
1070
|
+
|
1071
|
+
# CSS
|
1072
|
+
|
1073
|
+
ExpiresByType text/css "access plus 1 year"
|
1074
|
+
|
1075
|
+
|
1076
|
+
# Data interchange
|
1077
|
+
|
1078
|
+
ExpiresByType application/atom+xml "access plus 1 hour"
|
1079
|
+
ExpiresByType application/rdf+xml "access plus 1 hour"
|
1080
|
+
ExpiresByType application/rss+xml "access plus 1 hour"
|
1081
|
+
|
1082
|
+
ExpiresByType application/json "access plus 0 seconds"
|
1083
|
+
ExpiresByType application/ld+json "access plus 0 seconds"
|
1084
|
+
ExpiresByType application/schema+json "access plus 0 seconds"
|
1085
|
+
ExpiresByType application/vnd.geo+json "access plus 0 seconds"
|
1086
|
+
ExpiresByType application/xml "access plus 0 seconds"
|
1087
|
+
ExpiresByType text/calendar "access plus 0 seconds"
|
1088
|
+
ExpiresByType text/xml "access plus 0 seconds"
|
1089
|
+
|
1090
|
+
|
1091
|
+
# Favicon (cannot be renamed!) and cursor images
|
1092
|
+
|
1093
|
+
ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
|
1094
|
+
ExpiresByType image/x-icon "access plus 1 week"
|
1095
|
+
|
1096
|
+
# HTML
|
1097
|
+
|
1098
|
+
ExpiresByType text/html "access plus 0 seconds"
|
1099
|
+
|
1100
|
+
|
1101
|
+
# JavaScript
|
1102
|
+
|
1103
|
+
ExpiresByType application/javascript "access plus 1 year"
|
1104
|
+
ExpiresByType application/x-javascript "access plus 1 year"
|
1105
|
+
ExpiresByType text/javascript "access plus 1 year"
|
1106
|
+
|
1107
|
+
|
1108
|
+
# Manifest files
|
1109
|
+
|
1110
|
+
ExpiresByType application/manifest+json "access plus 1 week"
|
1111
|
+
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
|
1112
|
+
ExpiresByType text/cache-manifest "access plus 0 seconds"
|
1113
|
+
|
1114
|
+
|
1115
|
+
# Markdown
|
1116
|
+
|
1117
|
+
ExpiresByType text/markdown "access plus 0 seconds"
|
1118
|
+
|
1119
|
+
|
1120
|
+
# Media files
|
1121
|
+
|
1122
|
+
ExpiresByType audio/ogg "access plus 1 month"
|
1123
|
+
ExpiresByType image/bmp "access plus 1 month"
|
1124
|
+
ExpiresByType image/gif "access plus 1 month"
|
1125
|
+
ExpiresByType image/jpeg "access plus 1 month"
|
1126
|
+
ExpiresByType image/png "access plus 1 month"
|
1127
|
+
ExpiresByType image/svg+xml "access plus 1 month"
|
1128
|
+
ExpiresByType image/webp "access plus 1 month"
|
1129
|
+
ExpiresByType video/mp4 "access plus 1 month"
|
1130
|
+
ExpiresByType video/ogg "access plus 1 month"
|
1131
|
+
ExpiresByType video/webm "access plus 1 month"
|
1132
|
+
|
1133
|
+
|
1134
|
+
# WebAssembly
|
1135
|
+
|
1136
|
+
ExpiresByType application/wasm "access plus 1 year"
|
1137
|
+
|
1138
|
+
|
1139
|
+
# Web fonts
|
1140
|
+
|
1141
|
+
# Collection
|
1142
|
+
ExpiresByType font/collection "access plus 1 month"
|
1143
|
+
|
1144
|
+
# Embedded OpenType (EOT)
|
1145
|
+
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
|
1146
|
+
ExpiresByType font/eot "access plus 1 month"
|
1147
|
+
|
1148
|
+
# OpenType
|
1149
|
+
ExpiresByType font/opentype "access plus 1 month"
|
1150
|
+
ExpiresByType font/otf "access plus 1 month"
|
1151
|
+
|
1152
|
+
# TrueType
|
1153
|
+
ExpiresByType application/x-font-ttf "access plus 1 month"
|
1154
|
+
ExpiresByType font/ttf "access plus 1 month"
|
1155
|
+
|
1156
|
+
# Web Open Font Format (WOFF) 1.0
|
1157
|
+
ExpiresByType application/font-woff "access plus 1 month"
|
1158
|
+
ExpiresByType application/x-font-woff "access plus 1 month"
|
1159
|
+
ExpiresByType font/woff "access plus 1 month"
|
1160
|
+
|
1161
|
+
# Web Open Font Format (WOFF) 2.0
|
1162
|
+
ExpiresByType application/font-woff2 "access plus 1 month"
|
1163
|
+
ExpiresByType font/woff2 "access plus 1 month"
|
1164
|
+
|
1165
|
+
|
1166
|
+
# Other
|
1167
|
+
|
1168
|
+
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
|
1169
|
+
|
1170
|
+
</IfModule>
|
1171
|
+
|
1172
|
+
# ----------------------------------------------------------------------
|
1173
|
+
# | File concatenation |
|
1174
|
+
# ----------------------------------------------------------------------
|
1175
|
+
|
1176
|
+
# Allow concatenation from within specific files.
|
1177
|
+
#
|
1178
|
+
# e.g.:
|
1179
|
+
#
|
1180
|
+
# If you have the following lines in a file called, for
|
1181
|
+
# example, `main.combined.js`:
|
1182
|
+
#
|
1183
|
+
# <!--#include file="js/jquery.js" -->
|
1184
|
+
# <!--#include file="js/jquery.timer.js" -->
|
1185
|
+
#
|
1186
|
+
# Apache will replace those lines with the content of the
|
1187
|
+
# specified files.
|
1188
|
+
|
1189
|
+
# <IfModule mod_include.c>
|
1190
|
+
|
1191
|
+
# <FilesMatch "\.combined\.js$">
|
1192
|
+
# Options +Includes
|
1193
|
+
# AddOutputFilterByType INCLUDES application/javascript \
|
1194
|
+
# application/x-javascript \
|
1195
|
+
# text/javascript
|
1196
|
+
# SetOutputFilter INCLUDES
|
1197
|
+
# </FilesMatch>
|
1198
|
+
|
1199
|
+
# <FilesMatch "\.combined\.css$">
|
1200
|
+
# Options +Includes
|
1201
|
+
# AddOutputFilterByType INCLUDES text/css
|
1202
|
+
# SetOutputFilter INCLUDES
|
1203
|
+
# </FilesMatch>
|
1204
|
+
|
1205
|
+
# </IfModule>
|
1206
|
+
|
1207
|
+
# ----------------------------------------------------------------------
|
1208
|
+
# | Filename-based cache busting |
|
1209
|
+
# ----------------------------------------------------------------------
|
1210
|
+
|
1211
|
+
# If you're not using a build process to manage your filename version
|
1212
|
+
# revving, you might want to consider enabling the following directives
|
1213
|
+
# to route all requests such as `/style.12345.css` to `/style.css`.
|
1214
|
+
#
|
1215
|
+
# To understand why this is important and even a better solution than
|
1216
|
+
# using something like `*.css?v231`, please see:
|
1217
|
+
# https://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
|
1218
|
+
|
1219
|
+
# <IfModule mod_rewrite.c>
|
1220
|
+
# RewriteEngine On
|
1221
|
+
# RewriteCond %{REQUEST_FILENAME} !-f
|
1222
|
+
# RewriteRule ^(.+)\.(\w+)\.(bmp|css|cur|gif|ico|jpe?g|m?js|png|svgz?|webp|webmanifest)$ $1.$3 [L]
|
1223
|
+
# </IfModule>
|
1224
|
+
|