Request for a "no capture" rewrite directive enhancement

Peter Mescalchin peter.mescalchin at gmail.com
Wed May 28 04:32:21 UTC 2014


Thanks for the reply BR.


That's not quite what I'm after - "rewrite" does an internal redirect,
"return" will tell the browser to redirect. This recipe is all about
CSS/JS "cache busting" of requested assets.


Make sense?


> What about:
>
> location ~ "^/[a-f0-9]{16}/(css|js)/(.+)" {
>
> 	expires 30d;
> 	return $scheme://$host/$1/$2? break;
> }
>
> ?
>
> You could add the 301 code for permanent redirect, see
> http://nginx.org/r/return
> ---
> *B. R.*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140528/97854e9e/attachment.html>


More information about the nginx mailing list