Support » Requests and Feedback » Pretty serious bug: 404 error because of server setting.

  • 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( $_SERVER['PATH_INFO'] , 'index.php'))

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

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

    Hope this helps



Viewing 2 replies - 1 through 2 (of 2 total)
  • Does WordPress have the bug because it doesn’t match your site, or does you site have a bug because it doesn’t conform to the standards?

    Or, should you make sure that you have a DirectoryIndex listing in your .htaccess file that adds your non-standard page?

    I think it’s wordpress. First of all, I use IIS and not Apache, so .htaccess files do not really apply. Secondly, adding ‘default.php’ to IIS’s default document setting is a job that has to be done manually, which means you can type it with a capital as well with a normal character.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pretty serious bug: 404 error because of server setting.’ is closed to new replies.