zhanjh / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Mod_ReWrite for Groups #250

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Can we use /min/something.js or /min/group.css to reference a group?

I added the following 2 rules to my .htaccess on my server and it works great. 
I know the rules are vary, vary crude for a more global implementation but the 
same concept should work.

RewriteRule ^(.*).js  index.php?g=$1 [L,NE]
RewriteRule ^(.*).css  index.php?g=$1 [L,NE]

Original issue reported on code.google.com by scot...@gmail.com on 31 Dec 2011 at 12:41

GoogleCodeExporter commented 9 years ago
I was thinking about this more. I have found myself creating a lot of groups 
for libs, one additional thing to this would be create a group say groupJS and 
groupCSS when you load /min/group.js and /min/group.css it would load the 
respective option.

ex:
RewriteRule ^(.*).(js|css)  index.php?g=$1&t=$2 [L,NE]

Original comment by charlies...@gmail.com on 28 Apr 2012 at 7:28

GoogleCodeExporter commented 9 years ago
The current URL format supports multiple groups and files and a versioning 
number (triggering a big Expires):

/min/g=css1,css2&f=help.css,foo/bar.css&124362

How would this work in the new format? I'm hesitant to introduce (and have to 
document and support) another format without more clear benefits, but these 
would be good to include on the wiki somewhere. Maybe the Cookbook page? 
Discussing this on the Google group might be useful.

Original comment by mrclay....@gmail.com on 28 Apr 2012 at 11:37

GoogleCodeExporter commented 9 years ago

Original comment by mrclay....@gmail.com on 28 Apr 2012 at 11:37