Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By catch on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
9.5.x
Introduced in version:
9.5.0
Description:
The htaccess rewrite rule that enables static gzipped JavaScript and CSS aggregates to be served to browsers that accept gzip encoding has been modified so that it performs less checks for file existence. This should not cause any functional change except for the performance improvement, however sites should ensure that the change is applied:
+++ b/.htaccess
+++ b/.htaccess
@@ -151,12 +151,12 @@ AddEncoding gzip svgz
@@ -151,12 +151,12 @@ AddEncoding gzip svgz
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
- RewriteRule ^(.*)\.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.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
- RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
+ RewriteRule ^(.*js_[a-zA-Z0-9-_]+)\.js$ $1\.js\.gz [QSA]
Impacts:
Site builders, administrators, editors
Comments
Grammar
"fewer checks for file existence"
Doubt clarification
My queries,
1. Is this chages are compulsory while migrating from drupal 9.2 to 9.5.0.
2. What are impacts if i done above mentioned 2 lines code changes means,
3. If I done above changes means, is server needs to be restarted?
Please share your thoughts..