Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 05:29 PM
Günther Steinmetz
Guest
 
Posts: n/a
Default Default file in subdirectories

i think it is user friendly to have a default file in each subdirectory.
However, i hate to have lots of index.html files. Instead i would like to
have a meaningful and unique file name for all my default files. Is there
any way to specify the default file name for a given subdirectory locally
(i.e. not on the server)?
Thanks for any answers.
Guenther

  #2  
Old July 20th, 2005, 05:29 PM
Salagir
Guest
 
Posts: n/a
Default Re: Default file in subdirectories

On Thu, 6 Nov 2003 10:58:41 +0100, in comp.infosystems.www.authoring.html,
Günther Steinmetz wrote:[color=blue]
> Is there
> any way to specify the default file name for a given subdirectory locally
> (i.e. not on the server)?[/color]

Not on the server ? On the client ???

if your webserver is apache, you can create a .htaccess file containing:
Directoryindex mypageiwant.html

--
++++++++ Zelda, Dragon Ball, Mana and my (art)work at www.salagir.com ++++++++
  #3  
Old July 20th, 2005, 05:29 PM
Andreas Keil
Guest
 
Posts: n/a
Default Re: Default file in subdirectories

"Günther Steinmetz" <gsteinmetz@web.de> wrote:[color=blue]
> i think it is user friendly to have a default file in each[/color]
subdirectory.[color=blue]
> However, i hate to have lots of index.html files. Instead i would like[/color]
to[color=blue]
> have a meaningful and unique file name for all my default files. Is[/color]
there[color=blue]
> any way to specify the default file name for a given subdirectory[/color]
locally[color=blue]
> (i.e. not on the server)?[/color]

Imagine you want to archive your website. After some years you have a
look at it on your hard drive. You won't find the entry point anymore.
Especially when there are a lot of html files. I hated the CSS
documentation e.g., because it's main file was named "content.html"
instead of "index.html". Therefore, I had to search for it when having
downloaded the docs.
Personally, I prefer creating meaningful folder names now and always
using "index.html" even if there's only one html file.
Just for consideration.

Andreas

--
Andreas
To reply via e-mail, please remove the fruit and the ".invalid" top
level domain from my address.


  #4  
Old July 20th, 2005, 05:29 PM
Günther Steinmetz
Guest
 
Posts: n/a
Default Re: Default file in subdirectories

"Salagir" <Salagir@jeruCITEDELESPACE.org.invalid> schrieb im Newsbeitrag
news:3faa24ea$0$2772$626a54ce@news.free.fr...[color=blue]
> On Thu, 6 Nov 2003 10:58:41 +0100, in comp.infosystems.www.authoring.html,
> Günther Steinmetz wrote:[color=green]
> > Is there
> > any way to specify the default file name for a given subdirectory[/color][/color]
locally[color=blue][color=green]
> > (i.e. not on the server)?[/color]
>
> Not on the server ? On the client ???
>
> if your webserver is apache, you can create a .htaccess file containing:
> Directoryindex mypageiwant.html
>[/color]
Sorry for my stupid question. I was really not asking for something not
being on the server, but was looking for something i can control. Thanks for
your answer, it solves my problem. Of course now i need a .htaccess file in
each subdirectory, right?

  #5  
Old July 20th, 2005, 05:30 PM
Dave Patton
Guest
 
Posts: n/a
Default Re: Default file in subdirectories

Günther Steinmetz <gsteinmetz@web.de> wrote in news:bod63q$1d6k7c$1@ID-
67469.news.uni-berlin.de:
[color=blue]
> i think it is user friendly to have a default file in each subdirectory.
> However, i hate to have lots of index.html files. Instead i would like to
> have a meaningful and unique file name for all my default files. Is there
> any way to specify the default file name for a given subdirectory locally
> (i.e. not on the server)?
> Thanks for any answers.
> Guenther[/color]

If you are using Apache, you can add directives to your
..htaccess file(if they are supported by your server).
The simple thing is to specify Directoryindex, and that
will apply for the current directory and all subdirectories
(unless it is overridden).
It's not clear if you want a different index file name in
each subdirectory - if so, that would take more work.
You could also do something like use a custom error handler
to solve the problem - add ErrorDocument directive(s) to
..htacess that point to a script(e.g. PHP) that serves the
required index file for the directory when index.htm, index.html,
index.php, etc. is requested.

--
Dave Patton
Canadian Coordinator, the Degree Confluence Project
http://www.confluence.org dpatton at confluence dot org
My website: http://members.shaw.ca/davepatton/
Vancouver/Whistler - host of the 2010 Winter Olympics
  #6  
Old July 20th, 2005, 05:30 PM
Stan Brown
Guest
 
Posts: n/a
Default Re: Default file in subdirectories

In article <bod63q$1d6k7c$1@ID-67469.news.uni-berlin.de> in
comp.infosystems.www.authoring.html, Günther Steinmetz
<gsteinmetz@web.de> wrote:[color=blue]
>i think it is user friendly to have a default file in each subdirectory.
>However, i hate to have lots of index.html files. Instead i would like to
>have a meaningful and unique file name for all my default files. Is there
>any way to specify the default file name for a given subdirectory locally
>(i.e. not on the server)?[/color]

No. That is a logical impossibility.

What you mean by "default file" is what the server gives the user
when the user specifies a URL ending in a slash. (These are not
necessarily directory identifiers, but often are.) How would a
browser know what to ask for? It can't; it must depend on the
server.

Now, if you want to do it on the _server_ there is most likely a
command. Which command of course depends on which server, and when
you post your query to one of the comp.infosystems.www.servers.*
newsgroups you should specify that.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
  #7  
Old July 20th, 2005, 05:30 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: Default file in subdirectories


"Günther Steinmetz" <gsteinmetz@web.de> wrote in message
news:bod63q$1d6k7c$1@ID-67469.news.uni-berlin.de...[color=blue]
> i think it is user friendly to have a default file in each subdirectory.
> However, i hate to have lots of index.html files. Instead i would like to
> have a meaningful and unique file name for all my default files. Is there
> any way to specify the default file name for a given subdirectory locally
> (i.e. not on the server)?[/color]

You can always use meaningful names for these pages, and then create files
called index.html that point to them. It is indeed easiest for future
maintenance purposes to know that, for any directory, you can find the entry
point in a file named index.html. (Or index.asp or default.jsp or whatever
you like, as long as it's consistent.)

  #8  
Old July 20th, 2005, 05:45 PM
Salagir
Guest
 
Posts: n/a
Default Re: Default file in subdirectories

On Thu, 6 Nov 2003 12:14:18 +0100, in comp.infosystems.www.authoring.html,
Günther Steinmetz wrote:[color=blue]
> "Salagir" <Salagir@jeruCITEDELESPACE.org.invalid> schrieb im Newsbeitrag
> news:3faa24ea$0$2772$626a54ce@news.free.fr...[color=green]
> > Directoryindex mypageiwant.html[/color]
> it solves my problem. Of course now i need a .htaccess file in
> each subdirectory, right?[/color]

Nope :)

The htaccess applies to the directory it's in and all its subdirectories,
except if they also have a htaccess.

--
++++++++ Zelda, Dragon Ball, Mana and my (art)work at www.salagir.com ++++++++
As a math atheist, I think I should be excused from this.
--- Calvin, to Hobbes
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles