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.
If a site's files are stored in a directory with ".js" or ".css" in its name, and gzipped CSS/JavaScript files are being automatically generated, the rewrite will happen incorrectly.
For example:
sites/example.com.csstutorial/files/css/css__zN49QQO5PF_ZZXxYLLgh5tXkfpPkDwQizQGJjiAMKY.css
will be re-rewritten to
sites/example.com.css.gz
This can be fixed by simply changing the rules in .htaccess to check for the end of string.
Comment | File | Size | Author |
---|---|---|---|
css-js-gzip-rewrite.patch | 822 bytes | spam38 | |
Comments
Comment #1
darol100 CreditAttribution: darol100 as a volunteer and commentedI test this patch out and did not work for me.
After I apply the patch this is the results
http://d7.dev/sites/default/files/css/css_xE-rWrJf-fncB6ztZfd2huxqgxu4WO-qwma6Xer30m4.css
.Let me know, if I'm missing something.