Forums

404 on non-WP page in permalink directory (2 posts)

  1. JordonK
    Member
    Posted 3 years ago #

    My permalink structure is /archives/%year%/%monthnum%/%day%/%postname%/. The directory /archives exists and contains some non-WordPress PHP pages (with .html extensions). The .htaccess file for this directory consists of the line "DirectoryIndex index.html".

    When I go to http://www.mydomain.com/archives/, the file index.html loads as intended. But in my server logs it is recorded as a 404 error. (The LiveHTTPHeaders Firefox extension also says that the page is a 404.) If I go directly to http://www.mydomain.com/archives/index.html, the page also loads, but the HTTP status code returned is 200 OK.

    I want to be able to go to http://www.mydomain.com/archives/ and have index.html load with the proper HTTP code. I tried using the PHP header() function to replace the original Response header with a new one, but my server logs are still showing 404s, so that doesn't work.

  2. kerv
    Member
    Posted 3 years ago #

    I also get a similar problem on IIS6 with wordpress 2.7 installed to the root of my domain.

    I've changed permalinks to /index.php/%category%/%postname%/

    When I do this, http://www.mydomain.com/ is inaccessible, however http://www.mydomain.com/index.php is accessible. Also, all posts are accessible as http://www.mydomain.com/index.php/categoryname/post/

    It's just the root domain entry page that gives a 404 error in my logs looking for /Index.php, throws a 404 error.

    Any ideas?

    UPDATE: I managed to fix this by changing the site hosting from using php-cgi to phpisapi. I don't think it will affect anything. - sorry to hijack the OP.

Topic Closed

This topic has been closed to new replies.

About this Topic