Htaccess rewrite rules for gzipped CSS and JavaScript aggregates never match

Created on 25 January 2023, almost 2 years ago
Updated 2 April 2023, over 1 year ago

Problem/Motivation

Rewrite rules for gzipped CSS and JavaScript aggregates in .htaccess never match, because regex lacks a quantifier for the character class.

Steps to reproduce

RewriteRule ^(.*css_[a-zA-Z0-9-_])\.css$ $1\.css\.gz [QSA]
RewriteRule ^(.*js_[a-zA-Z0-9-_])\.js$ $1\.js\.gz [QSA]

Proposed resolution

RewriteRule ^(.*css_[a-zA-Z0-9-_]+)\.css$ $1\.css\.gz [QSA]
RewriteRule ^(.*js_[a-zA-Z0-9-_]+)\.js$ $1\.js\.gz [QSA]

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

The htaccess rewrite rule that enables static gzipped JavaScript and CSS aggregates to be served to browsers has been modified to improve performance. Sites should update their .htaccess files β†’ to take advantage of this performance improvement.

πŸ› Bug report
Status

Fixed

Version

9.5

Component
BaseΒ  β†’

Last updated 44 minutes ago

Created by

πŸ‡©πŸ‡ͺGermany sleitner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024