Forum Moderators: open

Message Too Old, No Replies

Linking to directories

linking to directories shows all files instead of index.html

         

jrthib

1:19 am on Sep 27, 2006 (gmt 0)

10+ Year Member



I'm having a bit of trouble linking my website to the 2 different directories in it. my site comes up to a page first then i can either click to go one direction or the other. the directories i'd like to have it link to is just to be "/high_school/" and "/middle_school/". whenever i try to make a simple link to these directories, instead of displaying the index.html file it lists everything in the directory. Any suggestions?

eelixduppy

1:24 am on Sep 27, 2006 (gmt 0)



If you are using Apache, you have to make sure that your directory index is properly set in your httpd.conf:

DirectoryIndex index.html

Car_Guy

1:24 am on Sep 27, 2006 (gmt 0)

10+ Year Member



For some unknown reason, your browser is not finding and displaying the index.html file in the directory. In its place, the server is generating the list of contents of the directory.

penders

9:15 am on Sep 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Your server may only be set to display
index.htm
files (without the 'l') by default (?!) - (See eelixduppy's entry above)

jrthib

2:02 pm on Sep 27, 2006 (gmt 0)

10+ Year Member



How would i change the Apache server to look for index.html as default in the directories?

Philosopher

2:07 pm on Sep 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you know what kind of server you are on? Is it an apache based server or windows server?

jrthib

2:15 pm on Sep 27, 2006 (gmt 0)

10+ Year Member



it is apache.

Philosopher

2:26 pm on Sep 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Then, if it is a dedicated server, do as eelixduppy suggested. If it is a shared server and you don't have access to the httpd.conf file, then add that that line of code to your .htaccess file.