代码之家  ›  专栏  ›  技术社区  ›  milesmeow

我需要在我的网站上有一个传真吗?如何消除在Apache日志中看到的错误?

  •  14
  • milesmeow  · 技术社区  · 14 年前

    我一直在Apache日志中看到favicon警告。我怎样才能摆脱这些?我的网站需要一个传真吗?

    7 回复  |  直到 8 年前
        1
  •  15
  •   Piskvor left the building Rohit Kumar    14 年前

    /favicon.ico

        2
  •  10
  •   Maltronic    14 年前

    http://www.trilithium.com/johan/2005/02/no-favicon/

    # Don't bother looking for favicon.ico
    Redirect 404 /favicon.ico
    
    # Don't bother sending the custom error page for favicon.ico
    <Location /favicon.ico>
        ErrorDocument 404 "No favicon
    </Location>
    

        3
  •  9
  •   Wyatt Anderson    14 年前

    /favicon.ico

        4
  •  4
  •   rink.attendant.6    9 年前

    <link rel="shortcut icon" />

    mod_rewrite

    # turn on the mod_rewrite module
    RewriteEngine On
    # if requested file is not an existing file
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f 
    # and it's name is favicon.ico, send an empty 410 GONE response to the browser
    RewriteRule .*favicon\.ico$ - [G] 
    

        5
  •  2
  •   philippe_b    9 年前

    • favicon.ico
    • apple-touch-icon.png
    • apple-touch-icon-precomposed.png
    • apple-touch-icon-76x76.png
    • apple-touch-icon-120x120.png
    • apple-touch-icon-152x152.png

    favicon generator

        7
  •  -2
  •   PeeHaa    14 年前

    <link rel="shortcut icon" href="favicon.ico">