Skip to content

Commit b613882

Browse files
lapoigneSbgodin
authored andcommitted
1 parent 1e2564e commit b613882

File tree

1 file changed

+45
-40
lines changed

1 file changed

+45
-40
lines changed

.htaccess

+45-40
Original file line numberDiff line numberDiff line change
@@ -124,46 +124,51 @@ AddType text/x-vcard vcf
124124
</IfModule>
125125

126126
# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
127-
# <IfModule filter_module>
128-
# FilterDeclare COMPRESS
129-
# There are two way to configure the filters, according to the Apache version.
130-
# Apache >= 2.4
131-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
132-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
133-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
134-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
135-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
136-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
137-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
138-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
139-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
140-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
141-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
142-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
143-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
144-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $image/x-icon
145-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
146-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
147-
# Apache <= 2.2
148-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
149-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
150-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
151-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
152-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
153-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
154-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
155-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
156-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
157-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
158-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
159-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
160-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
161-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $image/x-icon
162-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
163-
# FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
164-
# FilterChain COMPRESS
165-
# FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
166-
# </IfModule>
127+
# There are two way to configure the filters, according to the Apache version.
128+
<IfModule version.c>
129+
<IfModule filter_module>
130+
FilterDeclare COMPRESS
131+
<IfVersion >= 2.4>
132+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$text/html'"
133+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$text/css'"
134+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$text/plain'"
135+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$text/xml'"
136+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$text/x-component'"
137+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$application/javascript'"
138+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$application/json'"
139+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$application/xml'"
140+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$application/xhtml+xml'"
141+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$application/rss+xml'"
142+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$application/atom+xml'"
143+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$application/vnd.ms-fontobject'"
144+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$image/svg+xml'"
145+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$image/x-icon'"
146+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$application/x-font-ttf'"
147+
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} ='$font/opentype'"
148+
</IfVersion>
149+
<IfVersion <= 2.2>
150+
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
151+
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
152+
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
153+
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
154+
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
155+
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
156+
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
157+
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
158+
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
159+
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
160+
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
161+
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
162+
FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
163+
FilterProvider COMPRESS DEFLATE resp=Content-Type $image/x-icon
164+
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
165+
FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
166+
</IfVersion>
167+
FilterChain COMPRESS
168+
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
169+
</IfModule>
170+
</IfModule>
171+
167172

168173
<IfModule !mod_filter.c>
169174
# Legacy versions of Apache

0 commit comments

Comments
 (0)