How to set default document for WordPress

Discussion in 'Apache' started by heyman, Dec 24, 2007.

  1. #1
    I am not sure what happened - but the default document for a wordpress site screwed up. When I navigated to default page - it showed me directory listing.

    To fix that I added a .htaccess in the root of the site:

    DirectoryIndex wp-content/index.php

    But it shows a blank page.

    Can someone help me fix this?
     
    heyman, Dec 24, 2007 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    The DirectoryIndex directive should only have a directory name in the value if there's more than one value & it should be the last value in the list.
    http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex

    Go ahead & remove that from your htaccess, it shouldn't be needed.

    Did you accidently delete the index.php from your wordpress root ?

    In the same directory that contains the folders "wp-content", "wp-admin", and "wp-includes", you should have an index.php that's 94 bytes & contains the following.
    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>
    Code (markup):
     
    joebert, Dec 24, 2007 IP