1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Apache module mod_autoindex</TITLE>
</HEAD>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#000080"
ALINK="#FF0000"
>
<DIV ALIGN="CENTER">
<IMG SRC="../images/sub.gif" ALT="[APACHE DOCUMENTATION]">
<H3>
Apache HTTP Server Version 1.3
</H3>
</DIV>
<H1 ALIGN="CENTER">Module mod_autoindex</H1>
This module is contained in the <CODE>mod_autoindex.c</CODE> file, and
is compiled in by default. It provides for automatic directory indexing.
<H2>Summary</H2>
The index of a directory can come from one of two sources:
<UL>
<LI>A file written by the user, typically called <CODE>index.html</CODE>.
The <A HREF="mod_dir.html#directoryindex">DirectoryIndex</A> directive sets
the name of this file.
This is controlled by <A HREF="mod_dir.html"><CODE>mod_dir</CODE></A>.
<LI>Otherwise, a listing generated by the server. The other directives
control the format of this listing. The <A HREF="#addicon">AddIcon</A>,
<A HREF="#addiconbyencoding">AddIconByEncoding</A> and
<A HREF="#addiconbytype">AddIconByType</A> are used to set a list of
icons to display for various file types; for each file listed, the
first icon listed that matches the file is displayed. These
are controlled by <CODE>mod_autoindex</CODE>.
</UL>
The two functions are separated so that you can completely remove
(or replace) automatic index generation should you want to.
<P>
If
<A
HREF="#fancyindexing"
><SAMP>FancyIndexing</SAMP></A>
is enabled, or the <SAMP>FancyIndexing</SAMP> keyword is present on the
<A
HREF="#indexoptions"
><SAMP>IndexOptions</SAMP></A>
directive, the column headers are links that control the
order of the display. If you select a header link, the
listing will be regenerated, sorted by the values in that
column. Selecting the same header repeatedly toggles
between ascending and descending order.
</P>
<P>
Note that when the display is sorted by "Size",
it's the <EM>actual</EM> size of the files that's used,
not the displayed value - so a 1010-byte file will
always be displayed before a 1011-byte file (if in ascending
order) even though they both are shown as "1K".
</P>
<H2>Directives</H2>
<MENU>
<LI><A HREF="#addalt">AddAlt</A>
<LI><A HREF="#addaltbyencoding">AddAltByEncoding</A>
<LI><A HREF="#addaltbytype">AddAltByType</A>
<LI><A HREF="#adddescription">AddDescription</A>
<LI><A HREF="#addicon">AddIcon</A>
<LI><A HREF="#addiconbyencoding">AddIconByEncoding</A>
<LI><A HREF="#addiconbytype">AddIconByType</A>
<LI><A HREF="#defaulticon">DefaultIcon</A>
<LI><A HREF="#fancyindexing">FancyIndexing</A>
<LI><A HREF="#headername">HeaderName</A>
<LI><A HREF="#indexignore">IndexIgnore</A>
<LI><A HREF="#indexoptions">IndexOptions</A>
<LI><A HREF="#indexorderdefault">IndexOrderDefault</A>
<LI><A HREF="#readmename">ReadmeName</A>
</MENU>
<HR>
<H2><A NAME="addalt">AddAlt</A></H2>
<!--%plaintext <?INDEX {\tt AddAlt} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> AddAlt <EM>string file file...</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex<P>
This sets the alternate text to display for a file, instead of an icon, for
<A HREF="#fancyindexing">FancyIndexing</A>. <EM>File</EM> is a file
extension, partial filename, wild-card expression or full filename for files
to describe. <EM>String</EM> is enclosed in double quotes
(<CODE>"</CODE>). This alternate text is displayed if the client is
image-incapable or has image loading disabled.
<HR>
<H2><A NAME="addaltbyencoding">AddAltByEncoding</A></H2>
<!--%plaintext <?INDEX {\tt AddAltByEncoding} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> AddAltByEncoding <EM>string MIME-encoding
MIME-encoding...</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex<P>
This sets the alternate text to display for a file, instead of an icon, for
<A HREF="#fancyindexing">FancyIndexing</A>. <EM>MIME-encoding</EM> is a
valid content-encoding, such as <SAMP>x-compress</SAMP>.
<EM>String</EM> is enclosed in double quotes
(<CODE>"</CODE>). This alternate text is displayed if the client is
image-incapable or has image loading disabled.
<HR>
<H2><A NAME="addaltbytype">AddAltByType</A></H2>
<!--%plaintext <?INDEX {\tt AddAltByType} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> AddAltByType <EM>string MIME-type MIME-type
...</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex<P>
This sets the alternate text to display for a file, instead of an icon, for
<A HREF="#fancyindexing">FancyIndexing</A>. <EM>MIME-type</EM> is a
valid content-type, such as <SAMP>text/html</SAMP>.
<EM>String</EM> is enclosed in double quotes
(<CODE>"</CODE>). This alternate text is displayed if the client is
image-incapable or has image loading disabled.
<HR>
<H2><A NAME="adddescription">AddDescription</A></H2>
<!--%plaintext <?INDEX {\tt AddDescription} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> AddDescription <EM>string file file...</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex<P>
This sets the description to display for a file, for
<A HREF="#fancyindexing">FancyIndexing</A>. <EM>File</EM> is a file
extension, partial filename, wild-card expression or full filename for files
to describe. <EM>String</EM> is enclosed in double quotes
(<CODE>"</CODE>). Example:
<BLOCKQUOTE><CODE>AddDescription "The planet Mars" /web/pics/mars.gif
</CODE></BLOCKQUOTE>
<P>
The description field is 23 bytes wide. 7 more bytes may be
added if the directory is covered by an
<CODE>IndexOptions SuppressSize</CODE>, and 19 bytes may be
added if <CODE>IndexOptions SuppressLastModified</CODE> is
in effect. The widest this column can be is therefore 49 bytes.
<blockquote>
As of Apache 1.3.10, the
<a href="#indexoptions:descriptionwidth">DescriptionWidth</a>
<samp>IndexOptions</samp> keyword allows you to adjust this width
to any arbitrary size.
</blockquote>
<b>Caution:</b> Descriptive text defined with <samp>AddDescription</samp>
may contain HTML markup, such as tags and character entities. If the
width of the description column should happen to truncate a tagged
element (such as cutting off the end of a bolded phrase), the results
may affect the rest of the directory listing.
</P>
<HR>
<H2><A NAME="addicon">AddIcon</A></H2>
<!--%plaintext <?INDEX {\tt AddIcon} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> AddIcon <EM>icon name name ...</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex<P>
This sets the icon to display next to a file ending in <EM>name</EM> for
<A HREF="#fancyindexing">FancyIndexing</A>. <EM>Icon</EM> is either a
(%-escaped) relative URL to the icon, or of the format
(<EM>alttext</EM>,<EM>url</EM>) where <EM>alttext</EM> is the text tag given
for an icon for non-graphical browsers.<P>
<EM>Name</EM> is either ^^DIRECTORY^^ for directories, ^^BLANKICON^^ for
blank lines (to format the list correctly), a file extension, a wildcard
expression, a partial filename or a complete filename. Examples:
<BLOCKQUOTE><CODE>
AddIcon (IMG,/icons/image.xbm) .gif .jpg .xbm <BR>
AddIcon /icons/dir.xbm ^^DIRECTORY^^ <BR>
AddIcon /icons/backup.xbm *~
</CODE></BLOCKQUOTE>
<A HREF="#addiconbytype">AddIconByType</A> should be used in preference to
AddIcon, when possible.<P><HR>
<H2><A NAME="addiconbyencoding">AddIconByEncoding</A></H2>
<!--%plaintext <?INDEX {\tt AddIconByEncoding} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> AddIconByEncoding <EM>icon MIME-encoding
MIME-encoding ...</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex<P>
This sets the icon to display next to files with
<EM>MIME-encoding</EM> for <A HREF="#fancyindexing">FancyIndexing</A>.
<EM>Icon</EM> is either a (%-escaped) relative URL to the icon, or of the
format (<EM>alttext</EM>,<EM>url</EM>) where <EM>alttext</EM> is the text tag
given for an icon for non-graphical browsers.<P>
<EM>Mime-encoding</EM> is a wildcard expression matching required the
content-encoding. Examples:
<BLOCKQUOTE><CODE>
AddIconByEncoding /icons/compress.xbm x-compress
</CODE></BLOCKQUOTE><P><HR>
<H2><A NAME="addiconbytype">AddIconByType</A></H2>
<!--%plaintext <?INDEX {\tt AddIconByType} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> AddIconByType <EM>icon MIME-type MIME-type
...</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex<P>
This sets the icon to display next to files of type <EM>MIME-type</EM> for
<A HREF="#fancyindexing">FancyIndexing</A>. <EM>Icon</EM> is either a
(%-escaped) relative URL to the icon, or of the format
(<EM>alttext</EM>,<EM>url</EM>) where <EM>alttext</EM> is the text tag given
for an icon for non-graphical browsers.<P>
<EM>Mime-type</EM> is a wildcard expression matching required the mime types.
Examples:
<BLOCKQUOTE><CODE>
AddIconByType (IMG,/icons/image.xbm) image/*
</CODE></BLOCKQUOTE><P><HR>
<H2><A NAME="defaulticon">DefaultIcon</A></H2>
<!--%plaintext <?INDEX {\tt DefaultIcon} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> DefaultIcon <EM>url</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex<P>
The DefaultIcon directive sets the icon to display for files when no
specific icon is known, for <A HREF="#fancyindexing">FancyIndexing</A>.
<EM>Url</EM> is a (%-escaped) relative URL to the icon. Examples:
<BLOCKQUOTE><CODE>
DefaultIcon /icon/unknown.xbm
</CODE></BLOCKQUOTE><P><HR>
<H2><A NAME="fancyindexing">FancyIndexing</A></H2>
<!--%plaintext <?INDEX {\tt FancyIndexing} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> FancyIndexing <EM>boolean</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex
<P>
The FancyIndexing directive sets the FancyIndexing option for a directory.
<EM>Boolean</EM> can be <CODE>on</CODE> or <CODE>off</CODE>. The
<A HREF="#indexoptions">IndexOptions</A> directive should be used in
preference.
</P>
<BLOCKQUOTE>
<STRONG>Note that in versions of Apache prior to 1.3.2, the
<SAMP>FancyIndexing</SAMP> and
<SAMP>IndexOptions</SAMP> directives will override each other. You
should use <SAMP>IndexOptions FancyIndexing</SAMP> in preference
to the standalone <SAMP>FancyIndexing</SAMP> directive.
As of Apache 1.3.2, a standalone <SAMP>FancyIndexing</SAMP> directive
is combined with any <SAMP>IndexOptions</SAMP> directive already
specified for the current scope.</STRONG>
</BLOCKQUOTE>
<HR>
<H2><A NAME="headername">HeaderName</A></H2>
<!--%plaintext <?INDEX {\tt HeaderName} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> HeaderName <EM>filename</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex
<BR>
<A
HREF="directive-dict.html#Compatibility"
REL="Help"
><STRONG>Compatibility:</STRONG></A> some features only available after
1.3.6; see text
<P>
The HeaderName directive sets the name of the file that will be inserted
at the top of the index listing. <EM>Filename</EM> is the name of the file
to include.
</P>
<BLOCKQUOTE><STRONG>Apache 1.3.6 and earlier:</STRONG>
The module first attempts to include <EM>filename</EM><CODE>.html</CODE>
as an HTML document, otherwise it will try to include <EM>filename</EM> as
plain text. <EM>Filename</EM> is treated as a filesystem path relative
to the directory being indexed. In no case is SSI processing done.
Example:
<BLOCKQUOTE><CODE>HeaderName HEADER</CODE></BLOCKQUOTE>
when indexing the directory <CODE>/web</CODE>, the server will first look for
the HTML file <CODE>/web/HEADER.html</CODE> and include it if found, otherwise
it will include the plain text file <CODE>/web/HEADER</CODE>, if it exists.
</BLOCKQUOTE>
<BLOCKQUOTE><STRONG>Apache versions after 1.3.6:</STRONG>
<EM>Filename</EM> is treated as a URI path relative to the one used
to access the directory being indexed, and must resolve to a document
with a major content type of "<SAMP>text</SAMP>" (<EM>e.g.</EM>,
<SAMP>text/html</SAMP>, <SAMP>text/plain</SAMP>, <EM>etc.</EM>).
This means that <EM>filename</EM> may refer to a CGI script if the
script's actual file type (as opposed to its output) is marked as
<SAMP>text/html</SAMP> such as with a directive like:
<PRE>
AddType text/html .cgi
</PRE>
<A HREF="../content-negotiation.html">Content negotiation</A>
will be performed if the <SAMP>MultiViews</SAMP>
<A HREF="core.html#options">option</A> is enabled.
If <EM>filename</EM> resolves to a static <SAMP>text/html</SAMP> document
(not a CGI script) and the
<SAMP>Includes</SAMP> <A HREF="core.html#options">option</A> is enabled,
the file will be processed for server-side includes (see the
<A HREF="mod_include.html"><SAMP>mod_include</SAMP></A> documentation).
</BLOCKQUOTE>
<P>
See also <A HREF="#readmename">ReadmeName</A>.
<P><HR>
<H2><A NAME="indexignore">IndexIgnore</A></H2>
<!--%plaintext <?INDEX {\tt IndexIgnore} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> IndexIgnore <EM>file file ...</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex<P>
The IndexIgnore directive adds to the list of files to hide when listing
a directory. <EM>File</EM> is a file extension, partial filename,
wildcard expression or full filename for files to ignore. Multiple
IndexIgnore directives add to the list, rather than the replacing the list
of ignored files. By default, the list contains `<CODE>.</CODE>'. Example:
<BLOCKQUOTE><CODE>
IndexIgnore README .htaccess *~
</CODE></BLOCKQUOTE><P><HR>
<H2><A NAME="indexoptions">IndexOptions</A></H2>
<!--%plaintext <?INDEX {\tt IndexOptions} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> IndexOptions <EM>option option ...</EM>
(Apache 1.3.2 and earlier)
<BR>
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> IndexOptions <EM>[+|-]option [+|-]option
...</EM>
(Apache 1.3.3 and later)
<BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex
<BR>
<A
HREF="directive-dict.html#Compatibility"
REL="Help"
><STRONG>Compatibility:</STRONG></A> '+/-' syntax and merging of multiple
<SAMP>IndexOptions</SAMP> directives is only available with
Apache 1.3.3 and later; the <samp>FoldersFirst</samp> and
<samp>DescriptionWidth</samp> options are only
available with Apache 1.3.10 and later
<P>
The IndexOptions directive specifies the behavior of the directory indexing.
<EM>Option</EM> can be one of
<DL>
<dt><a name="indexoptions:descriptionwidth">DescriptionWidth=[<em>n</em> | *]
(<em>Apache 1.3.10 and later</em>)</a>
<dd>
The <samp>DescriptionWidth</samp> keyword allows you to specify the
width of the description column in characters. If the keyword value
is '<samp>*</samp>', then the column is automatically sized to the
length of the longest filename in the display.
<b>See the section on <a href="#adddescription"><samp>AddDescription</samp></a>
for dangers inherent in truncating descriptions.</b></dd>
<DT><A NAME="indexoptions:fancyindexing">FancyIndexing</A>
<DD><!--%plaintext <?INDEX {\tt FancyIndexing} index option> -->
This turns on fancy indexing of directories.
<BLOCKQUOTE>
<STRONG>Note that in versions of Apache prior to 1.3.2, the
<SAMP>FancyIndexing</SAMP> and
<SAMP>IndexOptions</SAMP> directives will override each other. You
should use <SAMP>IndexOptions FancyIndexing</SAMP> in preference
to the standalone <SAMP>FancyIndexing</SAMP> directive.
As of Apache 1.3.2, a standalone <SAMP>FancyIndexing</SAMP> directive
is combined with any <SAMP>IndexOptions</SAMP> directive already
specified for the current scope.</STRONG>
</BLOCKQUOTE>
<dt><a name="indexoptions:foldersfirst">FoldersFirst
(<i>Apache 1.3.10 and later</i>)</a></dt>
<dd>
If this option is enabled, subdirectories in a FancyIndexed listing
will <i>always</i> appear first, followed by normal files in the
directory. The listing is basically broken into two components,
the files and the subdirectories, and each is sorted separately and
then displayed subdirectories-first. For instance, if the sort order
is descending by name, and <samp>FoldersFirst</samp> is enabled,
subdirectory <samp>Zed</samp> will be listed before subdirectory
<samp>Beta</samp>, which will be listed before normal files
<samp>Gamma</samp> and <samp>Alpha</samp>.
<b>This option only has an effect if
<a href="#indexoptions:fancyindexing"><samp>FancyIndexing</samp></a>
is also enabled.</b></dd>
<DT><A NAME="indexoptions:iconheight">IconHeight[=pixels] (<EM>Apache 1.3 and later</EM>)</A>
<DD>
<!--%plaintext <?INDEX {\tt IconHeight} index option> -->
Presence of this option, when used with IconWidth, will cause the server
to include <SAMP>HEIGHT</SAMP> and <SAMP>WIDTH</SAMP> attributes in the
<SAMP>IMG</SAMP> tag for the file icon. This allows browser to
precalculate the page layout without having to wait until all the
images have been loaded. If no value is given for the option, it
defaults to the standard height of the icons supplied with the Apache
software.
<DT><A NAME="indexoptions:iconsarelinks">IconsAreLinks</A>
<DD>
<!--%plaintext <?INDEX {\tt IconsAreLinks} index option> -->
This makes the icons part of the anchor for the filename, for
fancy indexing.
<DT><A NAME="indexoptions:iconwidth">IconWidth[=pixels] (<EM>Apache 1.3 and later</EM>)</A>
<DD>
<!--%plaintext <?INDEX {\tt IconWidth} index option> -->
Presence of this option, when used with IconHeight, will cause the server
to include <SAMP>HEIGHT</SAMP> and <SAMP>WIDTH</SAMP> attributes in the
<SAMP>IMG</SAMP> tag for the file icon. This allows browser to
precalculate the page layout without having to wait until all the
images have been loaded. If no value is given for the option, it
defaults to the standard width of the icons supplied with the Apache
software.
<DT><A NAME="indexoptions:namewidth">NameWidth=[<EM>n</EM> | *] (<EM>Apache 1.3.2 and later</EM>)</A>
<DD>
The NameWidth keyword allows you to specify the width of the
filename column in bytes. If the keyword value is '<SAMP>*</SAMP>',
then the column is automatically sized to the length of the longest
filename in the display.
<DT><A NAME="indexoptions:scanhtmltitles">ScanHTMLTitles</A>
<DD><!--%plaintext <?INDEX {\tt ScanHTMLTitles} index option> -->
This enables the extraction of the title from HTML documents for fancy
indexing. If the file does not have a description given by
<A HREF="#adddescription">AddDescription</A> then httpd will read the
document for the value of the TITLE tag. This is CPU and disk intensive.
<DT><A NAME="indexoptions:suppresscolumnsorting">SuppressColumnSorting</A>
<DD>
<!--%plaintext <?INDEX {\tt SuppressColumnSorting} index option> -->
If specified, Apache will not make the column headings in a FancyIndexed
directory listing into links for sorting. The default behaviour is
for them to be links; selecting the column heading will sort the directory
listing by the values in that column.
<STRONG>Only available in Apache 1.3 and later.</STRONG>
<DT><A NAME="indexoptions:suppressdescription">SuppressDescription</A>
<DD>
<!--%plaintext <?INDEX {\tt SuppressDescription} index option> -->
This will suppress the file description in fancy indexing listings.
<DT><A NAME="indexoptions:suppresshtmlpreamble">SuppressHTMLPreamble</A>
(<EM>Apache 1.3 and later</EM>)
<DD>
<!--%plaintext <?INDEX {\tt SuppressHTMLPreamble} index option> -->
If the directory actually contains a file specified by the
<A
HREF="#headername"
>HeaderName</A>
directive, the module usually includes the contents of the file
after a standard HTML preamble (<HTML>, <HEAD>, <EM>et
cetera</EM>). The SuppressHTMLPreamble option disables this behaviour,
causing the module to start the display with the header file contents.
The header file must contain appropriate HTML instructions in this case.
If there is no header file, the preamble is generated as usual.
<DT><A NAME="indexoptions:suppresslastmodified">SuppressLastModified</A>
<DD>
<!--%plaintext <?INDEX {\tt SuppressLastModified} index option> -->
This will suppress the display of the last modification date, in fancy
indexing listings.
<DT><A NAME="indexoptions:suppresssize">SuppressSize</A>
<DD>
<!--%plaintext <?INDEX {\tt SuppressSize} index option> -->
This will suppress the file size in fancy indexing listings.
</DL>
<P>
There are some noticeable differences in the behaviour of this
directive in recent (post-1.3.0) versions of Apache.
</P>
<DL>
<DT>Apache 1.3.2 and earlier:</DT>
<DD>
<P>
The default is that no options are enabled. If multiple IndexOptions
could apply to a directory, then the most specific one is taken complete;
the options are not merged. For example:
<BLOCKQUOTE><pre>
<Directory /web/docs>
IndexOptions FancyIndexing
</Directory>
<Directory /web/docs/spec>
IndexOptions ScanHTMLTitles
</Directory>
</pre></BLOCKQUOTE>
then only <CODE>ScanHTMLTitles</CODE> will be set for the /web/docs/spec
directory.
</P>
</DD>
<DT>Apache 1.3.3 and later:</DT>
<DD>
<P>
Apache 1.3.3 introduced some significant changes in the handling of
<SAMP>IndexOptions</SAMP> directives. In particular,
</P>
<UL>
<LI>Multiple <SAMP>IndexOptions</SAMP> directives for a single
directory are now merged together. The result of the example above
will now be the equivalent of
<CODE>IndexOptions FancyIndexing ScanHTMLTitles</CODE>.
</LI>
<LI>The addition of the incremental syntax (<EM>i.e.</EM>, prefixing
keywords with '+' or '-').
</LI>
</UL>
<P>
Whenever a '+' or '-' prefixed keyword is encountered, it is applied
to the current <SAMP>IndexOptions</SAMP> settings (which may have been
inherited from an upper-level directory). However, whenever an unprefixed
keyword is processed, it clears all inherited options and any incremental
settings encountered so far. Consider the following example:
</P>
<BLOCKQUOTE><CODE>IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
<BR>
IndexOptions +SuppressSize
<BR>
</CODE></BLOCKQUOTE>
<P>
The net effect is equivalent to
<CODE>IndexOptions FancyIndexing +SuppressSize</CODE>, because
the unprefixed <CODE>FancyIndexing</CODE> discarded the incremental
keywords before it, but allowed them to start accumulating again
afterward.
</P>
<P>
To unconditionally set the <CODE>IndexOptions</CODE> for a
particular directory, clearing the inherited settings, specify
keywords without either '+' or '-' prefixes.
</P>
</DD>
</DL>
<HR>
<H2><A NAME="indexorderdefault">IndexOrderDefault</A></H2>
<!--%plaintext <?INDEX {\tt IndexOrderDefault} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> IndexOrderDefault
<EM>Ascending|Descending</EM> <EM>Name|Date|Size|Description</EM>
<BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess
<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes
<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base
<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex
<BR>
<A
HREF="directive-dict.html#Compatibility"
REL="Help"
><STRONG>Compatibility:</STRONG></A> IndexOrderDefault is only available in
Apache 1.3.4 and later.
<P>
The <SAMP>IndexOrderDefault</SAMP> directive is used in combination with
the <A HREF="#indexoptions:fancyindexing"><SAMP>FancyIndexing</SAMP></A>
index option. By default, fancyindexed directory listings are displayed in ascending order by filename; the <SAMP>IndexOrderDefault</SAMP> allows
you to change this initial display order.
</P>
<P>
<SAMP>IndexOrderDefault</SAMP> takes two arguments. The first must be either
<SAMP>Ascending</SAMP> or <SAMP>Descending</SAMP>, indicating the direction
of the sort. The second argument must be one of the keywords
<SAMP>Name</SAMP>, <SAMP>Date</SAMP>, <SAMP>Size</SAMP>, or
<SAMP>Description</SAMP>, and identifies the primary key. The secondary
key is <EM>always</EM> the ascending filename.
</P>
<P>
You can force a directory listing to only be displayed in a particular
order by combining this directive with the
<A HREF="#indexoptions:suppresscolumnsorting"
><SAMP>SuppressColumnSorting</SAMP></A> index option; this will prevent
the client from requesting the directory listing in a different order.
</P>
<HR>
<H2><A NAME="readmename">ReadmeName</A></H2>
<!--%plaintext <?INDEX {\tt ReadmeName} directive> -->
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> ReadmeName <EM>filename</EM><BR>
<A
HREF="directive-dict.html#Context"
REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess<BR>
<A
HREF="directive-dict.html#Override"
REL="Help"
><STRONG>Override:</STRONG></A> Indexes<BR>
<A
HREF="directive-dict.html#Status"
REL="Help"
><STRONG>Status:</STRONG></A> Base<BR>
<A
HREF="directive-dict.html#Module"
REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex
<BR>
<A
HREF="directive-dict.html#Compatibility"
REL="Help"
><STRONG>Compatibility:</STRONG></A> some features only available after
1.3.6; see text
<P>
The ReadmeName directive sets the name of the file that will be appended
to the end of the index listing. <EM>Filename</EM> is the name of the file
to include, and is taken to be relative to the location being indexed.
</P>
<BLOCKQUOTE>
<STRONG>The <EM>filename</EM> argument is treated as a stub filename
in Apache 1.3.6 and earlier, and as a relative URI in later versions.
Details of how it is handled may be found under the description of
the <A HREF="#headername">HeaderName</A> directive, which uses the
same mechanism and changed at the same time as ReadmeName.</STRONG>
</BLOCKQUOTE>
<P>See also <A HREF="#headername">HeaderName</A>.<P>
<HR>
<H3 ALIGN="CENTER">
Apache HTTP Server Version 1.3
</H3>
<A HREF="./"><IMG SRC="../images/index.gif" ALT="Index"></A>
<A HREF="../"><IMG SRC="../images/home.gif" ALT="Home"></A>
</BODY>
</HTML>
|