Forum Moderators: phranque

Message Too Old, No Replies

default pages with htaccess in each directory

Want index.html to be the default setting

         

robinantill

10:19 pm on Dec 20, 2006 (gmt 0)

10+ Year Member



My site is set up with the following type of url's
root .. /info/contact/
root .. /info/terms/
root .. /gardensheds/
and in each folder there is a file called index.html however when I click on the web page address it does not display the page but asks 'Do you want to save the program or find a program to open it'

What I need is the index.html file to open automatically.

I know I can add - DirectoryIndex index.html to the folder and I have done this with the root folder. However as there are 100's of folders and sub folders I don't realy want to go through and add this to each folder.

Is there a command or instruction which I can add to the root folder which will enable every folder on my site to have index.html as the default web page?

Thanks for any help.
Robin

robinantill

10:33 pm on Dec 20, 2006 (gmt 0)

10+ Year Member



Hi,
I have sorted this out.
What I did wrong is to have the htaccess command in the wrong order. I have it as:-

DirectoryIndex index.html
AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes

and should have been:-

AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes
DirectoryIndex index.html

I needed the command for the index.html after the command telling the server to parse html pages, well that the only change I made.

jdMorgan

1:40 am on Dec 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Interesting... I've never seen that problem before.

You can combine your AddHandlers into one line if you like:


AddHandler server-parsed .html .shtml

Jim