Serving static versions of dynamic pages (non-RoR)

Ian M. Evans ianevans at digitalhit.com
Sat Aug 9 08:15:39 MSD 2008


Jean-Philippe wrote:
> Seems tricky if you want to test the cache existence and not simply 
> rewrite to the underscored version (which could be done with a simple 
> rewrite).

Right...is it correct to say that nginx can't regex replace BEFORE a 
file test? That is, the logic can say:

if the request is in location /galleries rewrite and serve up 
/galleries[path slashes converted to underscores].html

  but it can't say:
if the request is in location /galleries rewrite the URI to 
/galleries[path slashes converted to underscores].html, check to see if 
that exists and if so, serve it up?





More information about the nginx mailing list