Diff: STRATO-apps/wordpress_03/app/.htaccess_back_692a9cd9016a7
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
# BEGIN WP Rocket
2
+
# Use UTF-8 encoding for anything served text/plain or text/html
3
+
AddDefaultCharset UTF-8
4
+
# Force UTF-8 for a number of file formats
5
+
<IfModule mod_mime.c>
6
+
AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml
7
+
</IfModule>
8
+
9
+
# FileETag None is not enough for every server.
10
+
<IfModule mod_headers.c>
11
+
Header unset ETag
12
+
</IfModule>
13
+
14
+
# Since we’re sending far-future expires, we don’t need ETags for static content.
15
+
# developer.yahoo.com/performance/rules.html#etags
16
+
FileETag None
17
+
18
+
<IfModule mod_alias.c>
19
+
<FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$">
20
+
<IfModule mod_headers.c>
21
+
Header set X-Powered-By "WP Rocket/3.20.1.1"
22
+
Header unset Pragma
23
+
Header append Cache-Control "public"
24
+
Header unset Last-Modified
25
+
</IfModule>
26
+
</FilesMatch>
27
+
28
+
<FilesMatch "\.(css|htc|js|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$">
29
+
<IfModule mod_headers.c>
30
+
Header unset Pragma
31
+
Header append Cache-Control "public"
32
+
</IfModule>
33
+
</FilesMatch>
34
+
</IfModule>
35
+
36
+
<IfModule mod_mime.c>
37
+
AddType image/avif avif
38
+
AddType image/avif-sequence avifs
39
+
</IfModule>
40
+
# Expires headers (for better cache control)
41
+
<IfModule mod_expires.c>
42
+
ExpiresActive on
43
+
ExpiresDefault "access plus 1 month"
44
+
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
45
+
ExpiresByType text/cache-manifest "access plus 0 seconds"
46
+
# Your document html
47
+
ExpiresByType text/html "access plus 0 seconds"
48
+
# Data
49
+
ExpiresByType text/xml "access plus 0 seconds"
50
+
ExpiresByType application/xml "access plus 0 seconds"
51
+
ExpiresByType application/json "access plus 0 seconds"
52
+
# Feed
53
+
ExpiresByType application/rss+xml "access plus 1 hour"
54
+
ExpiresByType application/atom+xml "access plus 1 hour"
55
+
# Favicon (cannot be renamed)
56
+
ExpiresByType image/x-icon "access plus 1 week"
57
+
# Media: images, video, audio
58
+
ExpiresByType image/gif "access plus 4 months"
59
+
ExpiresByType image/png "access plus 4 months"
60
+
ExpiresByType image/jpeg "access plus 4 months"
61
+
ExpiresByType image/webp "access plus 4 months"
62
+
ExpiresByType video/ogg "access plus 4 months"
63
+
ExpiresByType audio/ogg "access plus 4 months"
64
+
ExpiresByType video/mp4 "access plus 4 months"
65
+
ExpiresByType video/webm "access plus 4 months"
66
+
ExpiresByType image/avif "access plus 4 months"
67
+
ExpiresByType image/avif-sequence "access plus 4 months"
68
+
# HTC files (css3pie)
69
+
ExpiresByType text/x-component "access plus 1 month"
70
+
# Webfonts
71
+
ExpiresByType font/ttf "access plus 4 months"
72
+
ExpiresByType font/otf "access plus 4 months"
73
+
ExpiresByType font/woff "access plus 4 months"
74
+
ExpiresByType font/woff2 "access plus 4 months"
75
+
ExpiresByType image/svg+xml "access plus 4 months"
76
+
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
77
+
# CSS and JavaScript
78
+
ExpiresByType text/css "access plus 1 year"
79
+
ExpiresByType application/javascript "access plus 1 year"
80
+
</IfModule>
81
+
# Gzip compression
82
+
<IfModule mod_deflate.c>
83
+
# Active compression
84
+
SetOutputFilter DEFLATE
85
+
# Force deflate for mangled headers
86
+
<IfModule mod_setenvif.c>
87
+
<IfModule mod_headers.c>
88
+
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
89
+
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
90
+
# Don’t compress images and other uncompressible content
91
+
SetEnvIfNoCase Request_URI \
92
+
\.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g|mp4|webm|webp|pdf)$ no-gzip dont-vary
93
+
</IfModule>
94
+
</IfModule>
95
+
96
+
# Compress all output labeled with one of the following MIME-types
97
+
<IfModule mod_filter.c>
98
+
AddOutputFilterByType DEFLATE application/atom+xml \
99
+
application/javascript \
100
+
application/json \
101
+
application/rss+xml \
102
+
application/vnd.ms-fontobject \
103
+
application/x-font-ttf \
104
+
application/xhtml+xml \
105
+
application/xml \
106
+
font/opentype \
107
+
image/svg+xml \
108
+
image/x-icon \
109
+
text/css \
110
+
text/html \
111
+
text/plain \
112
+
text/x-component \
113
+
text/xml
114
+
</IfModule>
115
+
<IfModule mod_headers.c>
116
+
Header append Vary: Accept-Encoding
117
+
</IfModule>
118
+
</IfModule>
119
+
120
+
<IfModule mod_mime.c>
121
+
AddType text/html .html_gzip
122
+
AddEncoding gzip .html_gzip
123
+
</IfModule>
124
+
<IfModule mod_setenvif.c>
125
+
SetEnvIfNoCase Request_URI \.html_gzip$ no-gzip
126
+
</IfModule>
127
+
128
+
<IfModule mod_rewrite.c>
129
+
RewriteEngine On
130
+
RewriteBase /
131
+
RewriteCond %{HTTPS} on [OR]
132
+
RewriteCond %{SERVER_PORT} ^443$ [OR]
133
+
RewriteCond %{HTTP:X-Forwarded-Proto} https
134
+
RewriteRule .* - [E=WPR_SSL:-https]
135
+
RewriteCond %{HTTP:Accept-Encoding} gzip
136
+
RewriteRule .* - [E=WPR_ENC:_gzip]
137
+
RewriteCond %{REQUEST_METHOD} GET
138
+
RewriteCond %{QUERY_STRING} =""
139
+
RewriteCond %{HTTP:Cookie} !(wordpress_logged_in_|tutor_user_|wordpress_logged_in_.+|wp-postpass_|wptouch_switch_toggle|comment_author_|comment_author_email_) [NC]
140
+
RewriteCond %{REQUEST_URI} !^(/(?:.+/)?feed(?:/(?:.+/?)?)?$|/(?:.+/)?embed/|/(index.php/)?(.*)wp-json(/.*|$))$ [NC]
141
+
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
142
+
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
143
+
RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
144
+
RewriteCond %{HTTP_USER_AGENT} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
145
+
RewriteCond %{HTTP_USER_AGENT} !^(facebookexternalhit|WhatsApp).* [NC]
146
+
RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/wp-rocket/%{HTTP_HOST}%{REQUEST_URI}/index%{ENV:WPR_SSL}%{ENV:WPR_WEBP}.html%{ENV:WPR_ENC}" -f
147
+
RewriteRule .* "/wp-content/cache/wp-rocket/%{HTTP_HOST}%{REQUEST_URI}/index%{ENV:WPR_SSL}%{ENV:WPR_WEBP}.html%{ENV:WPR_ENC}" [L]
148
+
</IfModule>
149
+
150
+
# END WP Rocket
151
+
# Block the include-only files.
152
+
<IfModule mod_rewrite.c>
153
+
RewriteEngine On
154
+
# Clickjacking Protection
155
+
Header always set X-Frame-Options "SAMEORIGIN"
156
+
157
+
# Prevent Content-Type sniffing
158
+
Header always set X-Content-Type-Options "nosniff"
159
+
160
+
# HTTPS Strict Transport Security
161
+
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
162
+
163
+
# Basic Content Security Policy
164
+
Header always set Content-Security-Policy "default-src 'self' https: data: 'unsafe-inline' 'unsafe-eval';"
165
+
166
+
# Referrer Policy
167
+
Header always set Referrer-Policy "strict-origin-when-cross-origin"
168
+
169
+
# XSS Protection
170
+
Header always set X-XSS-Protection "1; mode=block"
171
+
172
+
RewriteBase /
173
+
RewriteRule ^wp-admin/includes/ - [F,L]
174
+
RewriteRule !^wp-includes/ - [S=3]
175
+
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
176
+
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
177
+
RewriteRule ^wp-includes/theme-compat/ - [F,L]
178
+
</IfModule>
179
+
<Files wp-config.php>
180
+
<IfModule !mod_authz_core.c>
181
+
order allow,deny
182
+
deny from all
183
+
</IfModule>
184
+
<IfModule mod_authz_core.c>
185
+
require all denied
186
+
</IfModule>
187
+
</Files>
188
+
189
+
# BEGIN WordPress
190
+
# Die Anweisungen (Zeilen) zwischen „BEGIN WordPress“ und „END WordPress“ sind
191
+
# dynamisch generiert und sollten nur über WordPress-Filter geändert werden.
192
+
# Alle Änderungen an den Anweisungen zwischen diesen Markierungen werden überschrieben.
193
+
<IfModule mod_rewrite.c>
194
+
RewriteEngine On
195
+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
196
+
RewriteBase /
197
+
RewriteRule ^index\.php$ - [L]
198
+
RewriteCond %{REQUEST_FILENAME} !-f
199
+
RewriteCond %{REQUEST_FILENAME} !-d
200
+
RewriteRule . /index.php [L]
201
+
</IfModule>
202
+
203
+
# END WordPress