Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#31305 closed defect (bug) (duplicate)

wp_favicon_request function

Reported by: dugi digitaly Owned by:
Priority: normal Milestone:
Component: General Version: 3.0
Severity: normal Keywords:
Cc: Focuses:

Description

wp_favicon_request function not work if wordpress installed on directory like www.domain.com/wp/
$_SERVERREQUEST_URI is wp/favicon.ico

// www.domain.com/wp/
// $_SERVER['REQUEST_URI'] is 'wp/favicon.ico' <--
function wp_favicon_request() {
	if ( '/favicon.ico' == $_SERVER['REQUEST_URI'] ) {
		header('Content-Type: image/vnd.microsoft.icon');
		header('Content-Length: 0');
		exit;
	}
}

Change History (3)

#1 in reply to: ↑ description @dugi digitaly
12 years ago

my alternative is

if ( substr($_SERVER['REQUEST_URI'], -11 ) == 'favicon.ico' )

#2 @swissspidy
12 years ago

  • Version 4.13.0

Good catch! Maybe we should take home_url into account here.

#3 @TobiasBg
12 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Duplicate of #25861.

Note: See TracTickets for help on using tickets.