Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library

 

Category: >> .HTACCESS Codes Library >> Force Favicon Requests to Correct Location


Code Snippet </> Info


Snippet Name: Force Favicon Requests to Correct Location

Description: For whatever crazy reason, perhaps evil-doing site scanners, requests to a web server for a favicon in all known crevasses of the site are fairly common. Since that file probably only actually exists in the root directory of your site, these requests result in a 404. If you server up a fancy, user-friendly 404 page, this can add up to a ton of bandwidth for no good reason.

Note:

Author:

Last Modified: 2015-03-20 01:17:11

Language: .htaccess

Highlight Mode: html

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor


  About Copying
Copied To Clipboard!

# REDIRECT FAVICON.ICO <ifmodule mod_rewrite.c> RewriteCond %{REQUEST_URI} !^/favicon\.ico [NC] RewriteCond %{REQUEST_URI} favicon\.ico [NC] RewriteRule (.*) http://snapbuilder.com/favicon.ico [R=301,L] </ifmodule>


[ Snippet Options ]

 

© 2002 -  Snap Builder Public Codes Library