Issue #3336463 by sleitner, recrit, catch: Htaccess rewrite rules for gzipped CSS and JavaScript aggregates never match
(cherry picked from commit 1d3e0326a5
)
merge-requests/3234/head
parent
6a984c2648
commit
7f5e51d92b
|
@ -151,12 +151,12 @@ AddEncoding gzip svgz
|
||||||
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
|
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
|
||||||
RewriteCond %{HTTP:Accept-encoding} gzip
|
RewriteCond %{HTTP:Accept-encoding} gzip
|
||||||
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
||||||
RewriteRule ^(.*css_[a-zA-Z0-9-_])\.css$ $1\.css\.gz [QSA]
|
RewriteRule ^(.*css_[a-zA-Z0-9-_]+)\.css$ $1\.css\.gz [QSA]
|
||||||
|
|
||||||
# Serve gzip compressed JS files if they exist and the client accepts gzip.
|
# Serve gzip compressed JS files if they exist and the client accepts gzip.
|
||||||
RewriteCond %{HTTP:Accept-encoding} gzip
|
RewriteCond %{HTTP:Accept-encoding} gzip
|
||||||
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
||||||
RewriteRule ^(.*js_[a-zA-Z0-9-_])\.js$ $1\.js\.gz [QSA]
|
RewriteRule ^(.*js_[a-zA-Z0-9-_]+)\.js$ $1\.js\.gz [QSA]
|
||||||
|
|
||||||
# Serve correct content types, and prevent double compression.
|
# Serve correct content types, and prevent double compression.
|
||||||
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1]
|
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1]
|
||||||
|
|
|
@ -151,12 +151,12 @@ AddEncoding gzip svgz
|
||||||
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
|
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
|
||||||
RewriteCond %{HTTP:Accept-encoding} gzip
|
RewriteCond %{HTTP:Accept-encoding} gzip
|
||||||
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
||||||
RewriteRule ^(.*css_[a-zA-Z0-9-_])\.css$ $1\.css\.gz [QSA]
|
RewriteRule ^(.*css_[a-zA-Z0-9-_]+)\.css$ $1\.css\.gz [QSA]
|
||||||
|
|
||||||
# Serve gzip compressed JS files if they exist and the client accepts gzip.
|
# Serve gzip compressed JS files if they exist and the client accepts gzip.
|
||||||
RewriteCond %{HTTP:Accept-encoding} gzip
|
RewriteCond %{HTTP:Accept-encoding} gzip
|
||||||
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
||||||
RewriteRule ^(.*js_[a-zA-Z0-9-_])\.js$ $1\.js\.gz [QSA]
|
RewriteRule ^(.*js_[a-zA-Z0-9-_]+)\.js$ $1\.js\.gz [QSA]
|
||||||
|
|
||||||
# Serve correct content types, and prevent double compression.
|
# Serve correct content types, and prevent double compression.
|
||||||
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1]
|
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1]
|
||||||
|
|
Loading…
Reference in New Issue