> rai...@ultra-secure.de <rai...@ultra-secure.de> [2016-01-28 15:12]: > > Hi, > > > a customer has this in his .htaccess file (among other things): > > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L] > > This is to enable versioning of various files, so you can have long > "Expires" on them and still update them as needed while retaining > the old ones, if needed. > > I want to deliver static files directly from nginx, so I created this: >
Not exactly sure about the notation in nginx but for regexp what about: > location ~* ^(.+)\.(\d+)\.(js|css|png|jpg|gif|gzip)$ { location ~* ^(.+)\.([\d\.]+)\.(js|css|png|jpg|gif|gzip)$ { wbr Lukas -- Lukas Ruf <http://www.lpr.ch> | Ad Personam Consecom <http://www.consecom.com> | Ad Laborem _______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx