Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#31305 closed defect (bug) (duplicate)

wp_favicon_request function

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

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
11 years ago

my alternative is

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

#2 @swissspidy
11 years ago

  • Version changed from 4.1 to 3.0

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

#3 @TobiasBg
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #25861.

Note: See TracTickets for help on using tickets.