Bug 20187 has changed the JS and CSS rewrite rules to : RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].js$ $1.js [L] RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].css$ $1.css [L] This can be written more short with one rule and [0-9]{N}. And the dot in extension needs to be escaped : \.js \.css
Created attachment 72014 [details] [review] Bug 20259: Shorter JS and CSS rewrite rule Bug 20187 has changed the JS and CSS rewrite rules to : RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].js$ $1.js [L] RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].css$ $1.css [L] This patch changes this rules using [0-9]{N} and fusion in one rule. And espaces the dot in extension js and css. Test plan : 1) Go to intranet and opac 2) Check CSS and JS are doing well 3) Apply patch changes on our Apache configuration 4) Reload intranet and opac pages (Ctrl + F5) 5) Check CSS and JS are doing well
Hum, I tried that and it did not work. Will try again later.
It works for me. (Apache was restarted, double checked that) Also tried the test plan from https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20187#c8 And checked the login pages. Tested with Apache 2.4.18 on Ubuntu 16.04
Only seeing 200's on my station. Looks good. Tested with: Server version: Apache/2.4.18 (Ubuntu) Server built: 2018-04-18T14:53:04
Created attachment 76111 [details] [review] Bug 20259: Shorter JS and CSS rewrite rule Bug 20187 has changed the JS and CSS rewrite rules to : RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].js$ $1.js [L] RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].css$ $1.css [L] This patch changes this rules using [0-9]{N} and fusion in one rule. And espaces the dot in extension js and css. Test plan : 1) Go to intranet and opac 2) Check CSS and JS are doing well 3) Apply patch changes on our Apache configuration 4) Reload intranet and opac pages (Ctrl + F5) 5) Check CSS and JS are doing well Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Created attachment 76147 [details] [review] Bug 20259: Shorter JS and CSS rewrite rule Bug 20187 has changed the JS and CSS rewrite rules to : RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].js$ $1.js [L] RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].css$ $1.css [L] This patch changes this rules using [0-9]{N} and fusion in one rule. And espaces the dot in extension js and css. Test plan : 1) Go to intranet and opac 2) Check CSS and JS are doing well 3) Apply patch changes on our Apache configuration 4) Reload intranet and opac pages (Ctrl + F5) 5) Check CSS and JS are doing well Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Awesome work all! Pushed to master for 18.11.x
If I understand correctly: The good thing is that people can keep the old rule without issue so they won't have to change the RewriteRules for 18.05 and 18.11
(In reply to Victor Grousset/tuxayo from comment #8) > If I understand correctly: The good thing is that people can keep the old > rule without issue so they won't have to change the RewriteRules for 18.05 > and 18.11 Yes, they are similar but one is easier to read.
I'm not going to backport this to 18.05.x, save surprising users having to intervene during package upgrades, especially as the rule change is a cosmetic one for server administrators only.
(In reply to Martin Renvoize from comment #10) > I'm not going to backport this to 18.05.x, save surprising users having to > intervene during package upgrades, especially as the rule change is a > cosmetic one for server administrators only. Indeed, server administrators love makeup ;)