Author Topic: Why is a directory listing shown instead of index.php?  (Read 28482 times)

0 Members and 2 Guests are viewing this topic.

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Why is a directory listing shown instead of index.php?
« on: March 12, 2005, 10:42:23 PM »
Quote
I downloaded the 4images package and the appropriate language pack. I also uploaded the files to my server and followed the directions found in docs/Installation.txt. Per the last instruction, I pointed my browser to the URL where I uploaded 4images, however I do not get the configuration/setup menu that I should. Instead I only see a directory listing with my files. What do I need to do to be able to get the setup menu to put in my database user/password/host/name?


Your web server doesn't know that it should look for a file named index.php. And since it can't find any file named index.htm or index.html, it displays the directory listing instead.

If you're using Apache, create a file named .htaccess (note the leading period character) in the top-level of your 4images directory, or web root, and place inside it the following line:
Code: [Select]
DirectoryIndex index.php index.htm index.html
This tells the Apache web server to first look for a file named index.php, then index.htm and finally index.html when a URL is entered in a browser without a file name. If you want to disable the directory listing for directories with no index.php or index.htm* files, add this line:
Code: [Select]
# Disable directory listings in the web browser
Options -Indexes