Need help with rewrite rule

Chris Cortese at
Wed Feb 25 06:15:09 MSK 2009

In Apache, I use the following rule.  It runs the combinator script, 
which serializes, minimizes, and gzips a list of javascript files:

RewriteRule ^/javascript/(.*\.js) /combine.php?type=javascript&files=$1

In nginx, I've tried many things, to no avail.  Right now I have:

 rewrite ^/javascript/(.*\.js)$ /combine.php?type=javascript&files=$1 last;

When I load my page and expand the HTML in firebug, at the place where I 

<script type="text/javascript" 
src=",effects.js,builder.js,lightbox_live.js,box.js"></script> shows me 1 line as follows:


Surely wildcards in nginx are greedy right?  Can anybody see what's 
wrong here?


More information about the nginx mailing list