Make WordPress Core

Opened 13 years ago

Closed 12 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:


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)

#1 @anonymousbugger
13 years ago

  • Patch set to No

#2 @sethkinast
13 years ago

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

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

#3 @ryan
13 years ago

  • Patch changed from No to Yes

#4 @Nazgul
12 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?

#5 @shorty114
12 years ago

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

I don't think this is worth fixing.

#6 @foolswisdom
12 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.