SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot The Big Show's Avatar
    Join Date
    Nov 2002
    Location
    USA
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Directory Display in WindowsXP

    I have set up a site on an Apache installation on my WinXP computer, but when I view directories like "localhost/site/", it displays a list of all the file names along with URLs to them, even if there is an index.php page in the directory. How can I get "localhost/site/" to redirect to "localhost/site/index.php" instead of showing the entire directory?

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add this to your httpd.con

    DirectoryIndex index.php


    Aaron
    Last edited by Sketch; Mar 8, 2003 at 12:34.
    Aaron Brazell
    Technosailor



  3. #3
    SitePoint Zealot The Big Show's Avatar
    Join Date
    Nov 2002
    Location
    USA
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where should that be placed? I put it at the end of httpd.conf, but it did nothing.

    I also tried inserting into this part of the file:

    <IfModule mod_dir.c>
    DirectoryIndex index.html index.php
    </IfModule>

    but that didn't do anything.

  4. #4
    SitePoint Zealot The Big Show's Avatar
    Join Date
    Nov 2002
    Location
    USA
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind..I changed it to this:

    <IfModule mod_dir.c>
    DirectoryIndex index.php
    DirectoryIndex index.html
    </IfModule>

    and it still had no effect. I then stopped and restarted Apache, and it finally worked.

  5. #5
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh....yeah...you have to do that too...

    Sorry I failed to mention that.
    Aaron Brazell
    Technosailor




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •