Apache directories

windows

Guest
Hi there,
Does anyone know how to tell Apache what file to use as the default page for a certain directory, like it knows to use index.html when you to the sites demain?

Thanks


Ninkowhat is wrong with using index.html?Well if I'm using 'index.html' in every directory I stand a chance of getting files mixed up and overwriting the wrong file etc etc lol.


Ninkohmm...well I guess that could happen. How do you organise your files? Do you use a wysiwig or text editor or what? How similar are your pages that you might mistake them for each other?DirectoryIndex (<!-- m --><a class="postlink" href="http://httpd.apache.org/docs/1.3/mod/mod_dir.html">http://httpd.apache.org/docs/1.3/mod/mod_dir.html</a><!-- m -->)Not sure I understand that doc Fang lol. Could you give an example?

Thanks


NinkoIn the directory you wish to open with 'myfile.html', create a file named '.htaccess'
In this file write 'DirectoryIndex myfile.html', close file, done!
<!-- m --><a class="postlink" href="http://www.javascriptkit.com/howto/htaccess6.shtmlAnd">http://www.javascriptkit.com/howto/htaccess6.shtmlAnd</a><!-- m --> then you have a bunch of other "files with the same name" to deal with. You're much better off just using the standard index file for the purpose.
 
Back
Top