Forums

[resolved] Directory showing on my localhost site but want to show the index.php file first (4 posts)

  1. imbradmiller
    Member
    Posted 3 years ago #

    I have successfully installed wordpress on my local machine but when I go to the directory "localhost/blog" where wordpress is located I get the directory listing instead of it going to index.php file like it should automatically. This also happens when I log into the admin panel. It shows the admin directory listing instead.

    Do I need to change something in a config file or something. I'm new to this but am learning very fast just need some help on this particular instance.

    Thanks in advance.

    Brad

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    Solution 1
    If allowed by your host, putting this in an .htaccess file will solve the problem:
    DirectoryIndex index.html index.htm index.php

    Solution 2
    Some hosts allow you to make a change, via their hosting control panel, to the DirectoryIndex. It's typically described as Indexes or Index documents, but may also require you to type something like
    DirectoryIndex index.html index.htm index.php
    or specify index.php as an index type file.

    Solution 3
    Instruct Apache to treat index.php as an index file. If you own the server, or have access to the http.conf file, simply modify the DirectoryIndex line in httpd.conf to:
    DirectoryIndex index.html index.htm index.php

    This search of the forum found the solutions described above:
    http://wordpress.org/search/displays+directory?forums=1

  3. imbradmiller
    Member
    Posted 3 years ago #

    Awesome I'll try this out. Thanks!

  4. imbradmiller
    Member
    Posted 3 years ago #

    Solution 3 totally worked! Thanks Michael!

Topic Closed

This topic has been closed to new replies.

About this Topic