WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#1070 closed defect (bug) (wontfix)

404 error because of common server setting

Reported by: anonymousbugger Owned by:
Milestone: Priority: normal
Severity: major Version: 1.5.1
Component: General Keywords: dev-feedback
Focuses: Cc:

Description

I found a bug that creates a 404 page not found error when you try to visit your wordpress site. This is caused by a server which has the default document (index.php) starting with a capital, like mine.

This means that a 404 error occurs when the default page set on the server is 'Index.php' instead of 'index.php'.

I found this line of code in wp-blog-header.php:
20: (false === strpos( $_SERVERPATH_INFO? , 'index.php'))

I was able to fix the problem easily by changing the line as follows:
20: (false === strpos( strtolower( $_SERVERPATH_INFO? ), 'index.php'))

Now wordpress can also handle server which have their default document setting starting with a capital :)

Change History (6)

comment:1 anonymousbugger9 years ago

  • Patch set to No

comment:2 sethkinast9 years ago

FWIW if this is a valid bug, proper fix is to use stripos.

20: (false === stripos( $_SERVERPATH_INFO? , 'index.php'))

comment:3 ryan9 years ago

  • Patch changed from No to Yes

comment:4 Nazgul8 years ago

  • Keywords dev-feedback added

The code mentioned in the original ticket is no longer in trunk, but the 'problem' is still there.

References to index.php are all over the map. Is it worth it to change them all to accomodate different capitalization scenarios?

I think it has quite a high impact and low usage. What do you guys think?

comment:5 shorty1147 years ago

Why oh why would you do Index.php instead of index.php...

I don't think this is worth fixing.

comment:6 foolswisdom7 years ago

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

Closing WONTFIX based on nazgul's recommendation and no compelling argument since.

Note: See TracTickets for help on using tickets.