473,800 Members | 2,518 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Jul 20 '05 #1
7 2276
On Thu, 6 Nov 2003 10:58:41 +0100, in comp.infosystem s.www.authoring.html,
Günther Steinmetz wrote:
Is there
any way to specify the default file name for a given subdirectory locally
(i.e. not on the server)?


Not on the server ? On the client ???

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

--
++++++++ Zelda, Dragon Ball, Mana and my (art)work at www.salagir.com ++++++++
Jul 20 '05 #2
"Günther Steinmetz" <gs********@web .de> wrote:
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)?


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.ht ml"
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.
Jul 20 '05 #3
"Salagir" <Sa*****@jeruCI TEDELESPACE.org .invalid> schrieb im Newsbeitrag
news:3f******** **************@ news.free.fr...
On Thu, 6 Nov 2003 10:58:41 +0100, in comp.infosystem s.www.authoring.html,
Günther Steinmetz wrote:
Is there
any way to specify the default file name for a given subdirectory locally (i.e. not on the server)?


Not on the server ? On the client ???

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

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?

Jul 20 '05 #4
Günther Steinmetz <gs********@web .de> wrote in news:bod63q$1d6 k7c$1@ID-
67469.news.uni-berlin.de:
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


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
Jul 20 '05 #5
In article <bo************ *@ID-67469.news.uni-berlin.de> in
comp.infosystem s.www.authoring.html, Günther Steinmetz
<gs********@web .de> wrote:
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)?


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.infosystem s.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/
Jul 20 '05 #6

"Günther Steinmetz" <gs********@web .de> wrote in message
news:bo******** *****@ID-67469.news.uni-berlin.de...
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)?


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.)

Jul 20 '05 #7
On Thu, 6 Nov 2003 12:14:18 +0100, in comp.infosystem s.www.authoring.html,
Günther Steinmetz wrote:
"Salagir" <Sa*****@jeruCI TEDELESPACE.org .invalid> schrieb im Newsbeitrag
news:3f******** **************@ news.free.fr...
Directoryindex mypageiwant.htm l

it solves my problem. Of course now i need a .htaccess file in
each subdirectory, right?


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
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
6329
by: Lab309 | last post by:
The problem I'm trying to solve is as follows: The website has two subdirectories: /ordinary and /phpstuff. Users typing hostname/ordinary get the file index.htm by default, and this works fine. Users typing hostname/phpstuff don't get anything because there is no index.htm there, only index.php. What can I put in an index.htm file that'll invoke the index.php file? Or is there a setting in the Apache 2.0 server I've overlooked? ...
5
3338
by: Thomas Philips | last post by:
I want to get a list of all subdirectories of a given directory, and within each directory, change the name of each file using a predetermined rule. The function glob in module glob will give me a list of all the subdirectories, and by looping over this list and repeatedly calling glob, I can create lists of files within each directory, which are easily edited to create lists of new filenames. How then can I change the existing...
4
3217
by: Ed | last post by:
Hello, I took a course in asp about 2 years ago and I was practicing with IIS 5.0. Then I put it down for a while. Now trying to get back to it. I can't run asp files from subdirectories of my root directory, but I can run asp files from the root directory of my website and I can run htm files from the subdirectories. If I run localhost/mytest.asp
1
2099
by: android | last post by:
<Directory xmlns="http://tempuri.org/test.xsd" name="root"> <file name="File1"></file> <file name="File2"></file> <Directory name="Dir1"> <file name="File1"></file> <file name="File2"></file> <Directory name="Dir1"> <file name="File1"></file> <file name="File2"></file> </Directory>
4
3503
by: Andy | last post by:
Hi, We have an asp 1.1. app with a number of subdirectories, but still part of the same app. One of these directories is now to have a couple of plain html files in them, so I diligently look at the directory properties dialog in IIS manaer to look at the documents tab. I've removed index.aspx (which used to be there) and have now added index.html, which is the new file to be used instead. Alas you get the 'directory listing denied'...
4
5870
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
Hi; It's there but I don't see anywhere that I actually tell my pages to include default.css from my theme? And how can I add a second css file from my theme to a specific page? -- thanks - dave david_at_windward_dot_net
4
2297
by: tasahmed | last post by:
Hello Friends, I wrote a function which scans the current working directory and lists out details such as directory/file owner, permission etc. The output of this script can be viewing in the monitor when I give the command print_r which is printed out in a array format. The problem I facing is I want this output in a text file, but I have tried so many things it is not working I am copying my code below, I need help in this urgently....
1
1312
by: w33d5 | last post by:
I'm looking for a little help in making an index file to read the subdirectories in the same folder and display the links in a table. i am loading photo galleries using google's picasa onto my host and since picasa exports the albums as folders (I am using a simpleviewer template) i would like to use a script to read the subdirectories in the \photos directory (where the index file would also be located) and display the folders in a clean...
10
2637
by: beary | last post by:
Hello all, I've done something a bit stupid and am hoping some kind soul out there can help me out. There's a piece of code that goes through and creates a high number of subdirectories within subdirectories, which is fine. Initially I forgot to create an index.html file in each directory to prevent viewing of its folders and files without people being logged in. I've fixed it now, but there are a whole heap of directories without this...
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10501
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10273
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7574
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.