Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#25861 closed defect (bug) (invalid)

favicon requests not caught when WP is installed in a subfolder

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.7.1
Component: Performance Keywords:
Focuses: Cc:

Description

We introduced a favicon.ico handler four years ago, but it only handles requests on sites installed in a root folder.

In case the attached git diff doesn't want to apply to svn, it basically amends the first line of wp_favicon_request() in wp-includes/load.php, like so:

function wp_favicon_request() {
	if ('/favicon.ico' == substr($_SERVER['REQUEST_URI'], -12)) {
		header('Content-Type: image/vnd.microsoft.icon');
		header('Content-Length: 0');
		exit;
	}
}

Attachments (1)

favicon_request.diff (470 bytes) - added by Denis-de-Bernardy 12 years ago.

Download all attachments as: .zip

Change History (5)

#1 @dd32
12 years ago

The favicon standard is on a domain-basis, as such, browsers only look in /, they won't look in /wordpress/.

A Theme can specify a custom location through link tags however.

So I'm not sure this patch will actually do anything at all?

#2 @Denis-de-Bernardy
12 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Yep, my bad. I needed to toss in a blank file in my localhost root. Sorry 'bout that.

#3 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review deleted

#4 @TobiasBg
10 years ago

#31305 was marked as a duplicate.

Note: See TracTickets for help on using tickets.