location vs. rewite

etrader nginx-forum at nginx.us
Thu Apr 4 08:16:30 UTC 2013

Anton Yuzhaninov Wrote:
> > rewrite ^/favicon.ico /var/www/media/images/favicon.X.ico last;
> This is wrong - you can rewrite to other location, not to path on file
> system.
> Anyway rewrite does not need here, use location.

Sorry, my bad! In the second case, I meant rewrite ^/favicon.ico
/media/images/favicon.X.ico last;

but anyway, it seems that location works better in general.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,238002,238078#msg-238078

More information about the nginx mailing list