Hi All
I need to know how to make a browser recognise a file other that index dot whatever when I browse to a particular directory.
I cannot rename the file in the script I am using as the file is called elsewhere in the code by name, so I need to be able to set an .htaccess parameter so that when I browse the directory I see the output of the file and not a directory listing.
Thanks...
.htaccess expert help please
Started by
theMusicMan
, Oct 17 2005 02:43 PM
4 replies to this topic
#1
Posted 17 October 2005 - 02:43 PM

John theMouthPiece
#2
Posted 17 October 2005 - 03:28 PM
Hi All
I need to know how to make a browser recognise a file other that index dot whatever when I browse to a particular directory.
I cannot rename the file in the script I am using as the file is called elsewhere in the code by name, so I need to be able to set an .htaccess parameter so that when I browse the directory I see the output of the file and not a directory listing.
Thanks...
DirectoryIndex yourfile.php alternatefile.html another.txt etc.htm
If you put that in a .htaccess file, it will use the first listed file in place of index.html (if it can't find it, then the next one, then the next...).
Eh.
#3
Posted 17 October 2005 - 03:30 PM
Hi All
I need to know how to make a browser recognise a file other that index dot whatever when I browse to a particular directory.
I cannot rename the file in the script I am using as the file is called elsewhere in the code by name, so I need to be able to set an .htaccess parameter so that when I browse the directory I see the output of the file and not a directory listing.
Thanks...
DirectoryIndex yourfile.php alternatefile.html another.txt etc.htm
If you put that in a .htaccess file, it will use the first listed file in place of index.html (if it can't find it, then the next one, then the next...).
errrrrrrrmm..... huh!!!!!
Sorry TCM but I am a dork when it comes to this stuff. What was that you said????

John theMouthPiece
#4
Posted 17 October 2005 - 03:44 PM
Hi All
I need to know how to make a browser recognise a file other that index dot whatever when I browse to a particular directory.
I cannot rename the file in the script I am using as the file is called elsewhere in the code by name, so I need to be able to set an .htaccess parameter so that when I browse the directory I see the output of the file and not a directory listing.
Thanks...
DirectoryIndex yourfile.php alternatefile.html another.txt etc.htm
If you put that in a .htaccess file, it will use the first listed file in place of index.html (if it can't find it, then the next one, then the next...).
errrrrrrrmm..... huh!!!!!
Sorry TCM but I am a dork when it comes to this stuff. What was that you said????
"DirectoryIndex page.html", where page.html is what page you want to appear when you go to the dirrectory. If you want to specify a list of files, and it will look for each of them in turn, this is an option as well.
Eh.
#5
Posted 17 October 2005 - 03:46 PM
Aha... now I get it, thanks. I'll try that now.

John theMouthPiece
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users
Sign In
Create Account










