forked from johannschopplich/kirby-vue3-starterkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
80 lines (67 loc) · 3.29 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Kirby .htaccess
# Core rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine on
# Make sure to set the RewriteBase correctly if you are running
# the site in a subfolder otherwise links or the entire site will break.
# RewriteBase /
# Block files and folders beginning with a dot, such as `.git`, except for
# the `.well-known` folder, which is used for Let's Encrypt and `security.txt`.
RewriteRule (^|/)\.(?!well-known\/) index.php [L]
# Make site links work.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
# Pass the Authorization header to PHP.
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
# Security
# Remove the `X-Powered-By` response header providing server-side technology information.
<IfModule mod_headers.c>
Header unset X-Powered-By
Header always unset X-Powered-By
</IfModule>
# Compression for better web performance
<IfModule mod_deflate.c>
# Force compression for mangled `Accept-Encoding` request headers.
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# Compress all output labeled with one of the following media types.
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE "application/atom+xml" \
"application/javascript" \
"application/json" \
"application/ld+json" \
"application/manifest+json" \
"application/rdf+xml" \
"application/rss+xml" \
"application/schema+json" \
"application/geo+json" \
"application/wasm" \
"application/x-font-ttf" \
"application/x-javascript" \
"application/x-web-app-manifest+json" \
"application/xhtml+xml" \
"application/xml" \
"font/opentype" \
"font/otf" \
"image/bmp" \
"image/svg+xml" \
"text/cache-manifest" \
"text/calendar" \
"text/css" \
"text/html" \
"text/javascript" \
"text/plain" \
"text/markdown" \
"text/vcard" \
"text/vtt" \
"text/x-component" \
"text/x-cross-domain-policy" \
"text/xml"
</IfModule>
</IfModule>