On Thu, Jan 28, 2016 at 03:12:16PM +0100, rai...@ultra-secure.de wrote: Hi there,
> RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L] > location ~* ^(.+)\.(\d+)\.(js|css|png|jpg|gif|gzip)$ { > rewrite ^(.+)\.(\d+)\.(js|css|png|jpg|gif|gzip)$ $1.$3 ; > expires 1h; > } > What's wrong with my nginx rewrite? > Because in apache, the rewrite rule works as intended. I see two main differences there: Your apache RewriteRule has [L] on the end. Your nginx rewrite does not. Possibly you want "break" -- http://nginx.org/r/rewrite Your apache RewriteRule is protected by RewriteCond. Your nginx rewrite is not. Possibly something involving try_files or error_page and a named location for fallback could achieve the same effect. f -- Francis Daly fran...@daoine.org _______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx