WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#19253 closed defect (bug) (duplicate)

blogname is case sensitive for front page requests on multisite using subdirectories

Reported by: Omicron7 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3
Component: Multisite Keywords: has-patch
Focuses: Cc:

Description

I have a multisite install using subdirectories. When a request is made for the front page of the site using the correct case for the blogname, the front page is rendered. If the incorrect case is used, a wordpress 404 page is rendered (in twentyeleven it is the "This is embarrassing..." page). Expected behavior would be to see the front page.

As an example:
I have a blog called "testblog" at www.example.com.
A request for www.example.com/testblog/ renders the front page.
A request for www.example.com/TestBlog/ renders a 404 page.

Wordpress is rendering the 404 page in the correct blog though (as opposed to the root level or dashboard blog).

Upon examination, wordpress is attempting to render the "TestBlog" page from the "testblog" blog and since this page does not exist, it is rendering a 404.

To fix this, I added case insensitive matching to the home path regexp in the parse_request method of the WP object.

I have tested this patch using latest posts and a static page on the front.

Attachments (1)

fix-case-sensitive-home-url.patch (932 bytes) - added by Omicron7 2 years ago.
Patch to add case insensitive matching to the home url while parsing a request.

Download all attachments as: .zip

Change History (2)

Omicron72 years ago

Patch to add case insensitive matching to the home url while parsing a request.

comment:1 SergeyBiryukov2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.