Need some help with rewrite rule translation

B.R. reallfqq-nginx at yahoo.fr
Thu Jun 13 21:01:15 UTC 2013


On Thu, Jun 13, 2013 at 4:51 PM, Jonathan Matthews
<contact at jpluscplusm.com>wrote:

> On 13 June 2013 09:38,  <mailinglisten at simonhoenscheid.de> wrote:
> [snip]
> >> RewriteRule ^favicon\.ico$ - [R=404,L]
> >
> > location /(^favicon)/(.*\.(ico)) {
> > return 404;
>
> Don't do that. You're only hurting yourself. Just return an empty gif
> (http://wiki.nginx.org/HttpEmptyGifModule) or ico/etc equivalent.
>
​
You could also do that:
location /favicon.ico {
    return 204;
    access_log      off;
    log_not_found   off;
}​



> Jonathan
> --
> Jonathan Matthews // Oxford, London, UK
> http://www.jpluscplusm.com/contact.html
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
---
*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130613/5e348d8b/attachment.html>


More information about the nginx mailing list