A regular expression will work for the 'static' middleware in the same was as for any other middleware or route; the problem, I think, is how 'static' maps the request path to the file system path. It's not a 'smart' mapping -- it essentially takes the URL path (/static/v123.21/... in your case (b)) and appends it to the filesystem static root -- producing /path/to/app/static/static/v123.21/...
I suspect your best bet for this use-case would be to write a wrapper/pre-processor middleware to rewrite the request URI and install that ahead of 'static', as in:
app.use(/regex/, rewrite, express.static(...))
TJ will probably have an easier solution, but failing that, this is where I'd start...
--
Laurie Harper
http://laurie.holoweb.net/
--
You received this message because you are subscribed to the Google Groups "Express" group.
To post to this group, send email to expre...@googlegroups.com.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/express-js?hl=en.
--