- - - - -

.htaccess expert help please


  • Please log in to reply
4 replies to this topic

#1 theMusicMan

theMusicMan

    John

  • Members
  • PipPipPipPipPip
  • 527 posts

Posted 17 October 2005 - 02:43 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...
user posted image
John theMouthPiece

#2 Jeremy Banks

Jeremy Banks

    Customer #1647

  • Members
  • PipPipPipPipPipPipPip
  • 1,567 posts

Posted 17 October 2005 - 03:28 PM

QUOTE(theMusicMan @ Oct 17 2005, 3:43 PM) View Post

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 theMusicMan

theMusicMan

    John

  • Members
  • PipPipPipPipPip
  • 527 posts

Posted 17 October 2005 - 03:30 PM

QUOTE(TCM @ Oct 17 2005, 9:28 PM) View Post

QUOTE(theMusicMan @ Oct 17 2005, 3:43 PM) View Post

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????
user posted image
John theMouthPiece

#4 Jeremy Banks

Jeremy Banks

    Customer #1647

  • Members
  • PipPipPipPipPipPipPip
  • 1,567 posts

Posted 17 October 2005 - 03:44 PM

QUOTE(theMusicMan @ Oct 17 2005, 4:30 PM) View Post

QUOTE(TCM @ Oct 17 2005, 9:28 PM) View Post

QUOTE(theMusicMan @ Oct 17 2005, 3:43 PM) View Post

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????
Sorry. I wasn't very clear at all. I meant, in your .htaccess file, but the following line:

"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 theMusicMan

theMusicMan

    John

  • Members
  • PipPipPipPipPip
  • 527 posts

Posted 17 October 2005 - 03:46 PM

Aha... now I get it, thanks.  I'll try that now.
user posted image
John theMouthPiece




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users