summaryrefslogtreecommitdiff
path: root/APACHE_1_3_42/htdocs/manual/mod/mod_autoindex.html.en
blob: baccdf6991ebb7d0fac893b9ca686f33094764b3 (plain)
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
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta name="generator" content="HTML Tidy, see www.w3.org" />

    <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">
    <!--#include virtual="header.html" -->

    <h1 align="CENTER">Module mod_autoindex</h1>
    This module provides for automatic directory indexing. 

    <p><a href="module-dict.html#Status"
    rel="Help"><strong>Status:</strong></a> Base<br />
     <a href="module-dict.html#SourceFile"
    rel="Help"><strong>Source File:</strong></a>
    mod_autoindex.c<br />
     <a href="module-dict.html#ModuleIdentifier"
    rel="Help"><strong>Module Identifier:</strong></a>
    autoindex_module</p>

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

      <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>.</li>
    </ul>
    The two functions are separated so that you can completely
    remove (or replace) automatic index generation should you want
    to. 

    <p>Automatic index generation is enabled with using
    <code>Options +Indexes</code>. See the <a
    href="core.html#options"><code>Options</code></a> directive for
    more details.</p>

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

    <ul>
      <li><a href="#addalt">AddAlt</a></li>

      <li><a href="#addaltbyencoding">AddAltByEncoding</a></li>

      <li><a href="#addaltbytype">AddAltByType</a></li>

      <li><a href="#adddescription">AddDescription</a></li>

      <li><a href="#addicon">AddIcon</a></li>

      <li><a href="#addiconbyencoding">AddIconByEncoding</a></li>

      <li><a href="#addiconbytype">AddIconByType</a></li>

      <li><a href="#defaulticon">DefaultIcon</a></li>

      <li><a href="#fancyindexing">FancyIndexing</a></li>

      <li><a href="#headername">HeaderName</a></li>

      <li><a href="#indexignore">IndexIgnore</a></li>

      <li><a href="#indexoptions">IndexOptions</a></li>

      <li><a href="#indexorderdefault">IndexOrderDefault</a></li>

      <li><a href="#readmename">ReadmeName</a></li>
    </ul>

    <p>See also: <a href="core.html#options">Options</a> and <a
    href="mod_dir.html#directoryindex">DirectoryIndex</a>.</p>

    <h2>Autoindex Request Query Arguments</h2>

    <p>The column sorting headers themselves are self-referencing
    hyperlinks that add the sort query options to reorder the
    directory listing. The query options are of the form
    <samp>X=Y</samp>, where <samp>X</samp> is one of <samp>N</samp>
    (file <em>N</em>ame), <samp>M</samp> (file last
    <em>M</em>odified date), <samp>S</samp> (file <em>S</em>ize), or
    <samp>D</samp> (file <em>D</em>escription), and <samp>Y</samp>
    is one of <samp>A</samp> (<em>A</em>scending) or <samp>D</samp>
    (<em>D</em>escending).</p>

    <p>When options other than the file name are used as the
    sorting key, the secondary key is always the file name. (When
    the file name is used to sort by, there is no need of a
    secondary sort key, since file names are guaranteed to be
    unique, and so the sort order is unambiguous.)</p>

    <p>Example:</p>

    <p>If the URL <samp>http://your.server.name/foo/</samp>
    produces a directory index, then the following URLs will
    produce different sort orders:</p>

    <ul>
      <li><samp>http://your.server.name/foo/?M=D</samp> sorts the
      directory by last modified date, descending.</li>

      <li><samp>http://your.server.name/foo/?D=A</samp> sorts the
      directory by file description, ascending.</li>

      <li><samp>http://your.server.name/foo/?S=A</samp> sorts the
      directory by file size, ascending.</li>
    </ul>

    <p>See <a
    href="#indexorderdefault"><samp>IndexOrderDefault</samp></a> to
    set the default directory ordering.</p>

    <p>Note also that when the directory listing is ordered in one
    direction (ascending or descending) by a particular column, the
    link at the top of that column then reverses, to allow sorting
    in the opposite direction by that same column.</p>
    <hr />

    <h2><a id="addalt" name="addalt">AddAlt</a> directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> AddAlt <em>string
    file</em> [<em>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.</p>

    <p>Examples:</p>
    <pre>
    AddAlt "PDF" *.pdf
    AddAlt "Compressed" *.gz *.zip *.Z
    </pre>

    <hr />

    <h2><a id="addaltbyencoding"
    name="addaltbyencoding">AddAltByEncoding</a> directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> AddAltByEncoding
    <em>string MIME-encoding</em> [<em>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.</p>

    <p>Example:</p>
    <pre>
    AddAltByEncoding "gzip" x-gzip
    </pre>

    <hr />

    <h2><a id="addaltbytype" name="addaltbytype">AddAltByType</a>
    directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> AddAltByType <em>string
    MIME-type</em> [<em>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.</p>

    <p>Example:</p>
    <pre>
    AddAltByType "TXT" text/plain
    </pre>
    <hr />

    <h2><a id="adddescription"
    name="adddescription">AddDescription</a> directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> AddDescription
    <em>"string" file|directory</em> [<em>file|directory</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 or directory, for <a
    href="#indexoptions">IndexOptions FancyIndexing</a>. 
    <em>file|directory</em> is a file extension, partial filename or 
    directory name, wild-card expression or full filename or directory name, 
    for files or directories to describe. <em>String</em> is enclosed in 
    double quotes (<code>"</code>). Example:</p>

    <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&nbsp;SuppressSize</code>, and 19 bytes may
    be added if <code>IndexOptions&nbsp;SuppressLastModified</code>
    is in effect. The widest this column can be is therefore 49
    bytes.</p>

    <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. 
    <hr />

    <h2><a id="addicon" name="addicon">AddIcon</a> directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> AddIcon <em>icon
    name</em> [<em>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>

    <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:</p>

    <blockquote>
      <code>AddIcon (IMG,/icons/image2.gif) .gif .jpg .png<br />
       AddIcon /icons/dir.gif ^^DIRECTORY^^<br />
       AddIcon /icons/backup.gif *~</code>
    </blockquote>
    <a href="#addiconbytype">AddIconByType</a> should be used in
    preference to AddIcon, when possible. 
    <hr />

    <h2><a id="addiconbyencoding"
    name="addiconbyencoding">AddIconByEncoding</a> directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> AddIconByEncoding
    <em>icon MIME-encoding</em> [<em>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>

    <p><em>Mime-encoding</em> is a wildcard expression matching
    required the content-encoding. Examples:</p>

    <blockquote>
      <code>AddIconByEncoding /icons/compressed.gif
      x-compress</code>
    </blockquote>
    <hr />

    <h2><a id="addiconbytype"
    name="addiconbytype">AddIconByType</a> directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> AddIconByType <em>icon
    MIME-type</em> [<em>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>

    <p><em>Mime-type</em> is a wildcard expression matching
    required the mime types. Examples:</p>

    <blockquote>
      <code>AddIconByType (IMG,/icons/image3.gif) image/*</code>
    </blockquote>
    <hr />

    <h2><a id="defaulticon" name="defaulticon">DefaultIcon</a>
    directive</h2>

    <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:</p>

    <blockquote>
      <code>DefaultIcon /icon/unknown.xbm</code>
    </blockquote>
    <hr />

    <h2><a id="fancyindexing"
    name="fancyindexing">FancyIndexing</a> directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> FancyIndexing
    on|off<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. 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&nbsp;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 id="headername" name="headername">HeaderName</a>
    directive</h2>

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

      <p>
      <em>Filename</em> is treated as a URI path relative to the
      one used to access the directory being indexed. Note that this
      means that if <em>Filename</em> starts with a slash, it will be
      taken to be relative to the <a
      href="core.html#documentroot">DocumentRoot</a>.</p>
      
      <p><em>Filename</em> 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: </p>

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

    <p>If the file specified by <samp>HeaderName</samp> contains
    the beginnings of an HTML document (&lt;HTML&gt;, &lt;HEAD&gt;,
    etc) then you will probably want to set <a
    href="#indexoptions:suppresshtmlpreamble"><samp>IndexOptions
    +SuppressHTMLPreamble</samp></a>, so that these tags are not
    repeated.</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>

    <p>See also <a href="#readmename">ReadmeName</a>.</p>
    <hr />

    <h2><a id="indexignore" name="indexignore">IndexIgnore</a>
    directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> IndexIgnore
    <em>file</em> [<em>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 replacing the list of ignored files. By
    default, the list contains `<code>.</code>'. Example:</p>

    <blockquote>
      <code>IndexIgnore README .htaccess *~</code>
    </blockquote>
    <hr />

    <h2><a id="indexoptions" name="indexoptions">IndexOptions</a>
    directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> IndexOptions
    <em>option</em> [<em>option</em>] ... (Apache 1.3.2 and
    earlier) <br />
     <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> IndexOptions
    [+|-]<em>option</em> [[+|-]<em>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; the
    <samp>TrackModified</samp> option is only available with Apache
    1.3.15 and later; the <samp>IgnoreCase</samp> option is only
    available with Apache 1.3.24 and later

    <p>The IndexOptions directive specifies the behavior of the
    directory indexing. <em>Option</em> can be one of</p>

    <dl>
      <dt><a id="indexoptions:descriptionwidth"
      name="indexoptions:descriptionwidth">DescriptionWidth=[<em>n</em>
      | *] (<em>Apache 1.3.10 and later</em>)</a></dt>

      <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 id="indexoptions:fancyindexing"
      name="indexoptions:fancyindexing">FancyIndexing</a></dt>

      <dd>

        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&nbsp;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>
      </dd>

      <dt><a id="indexoptions:foldersfirst"
      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 id="indexoptions:iconheight"
      name="indexoptions:iconheight">IconHeight[=pixels]
      (<em>Apache 1.3 and later</em>)</a></dt>

      <dd>

      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.</dd>

      <dt><a id="indexoptions:iconsarelinks"
      name="indexoptions:iconsarelinks">IconsAreLinks</a></dt>

      <dd>

      This makes the icons part of the anchor for the filename, for
      fancy indexing.</dd>

      <dt><a id="indexoptions:iconwidth"
      name="indexoptions:iconwidth">IconWidth[=pixels] (<em>Apache
      1.3 and later</em>)</a></dt>

      <dd>

      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.</dd>

      <dt><a id="indexoptions:ignorecase"
      name="indexoptions:ignorecase">IgnoreCase</a>
      (<em>Apache 1.3.24 and later</em>)</dt>

      <dd>
      If this option is enabled, names are sorted in case-insensitive
      manner.  For instance, if the sort order is ascending by name,
      and <samp>IgnoreCase</samp> is enabled, file <samp>Zeta</samp>
      will be listed after file <samp>alfa</samp> (Note: file
      <samp>GAMMA</samp> will always be listed before file
      <samp>gamma</samp>). <b>This option only has an effect if <a
      href="#indexoptions:fancyindexing"><samp>FancyIndexing</samp></a>
      is also enabled.</b></dd>

      <dt><a id="indexoptions:namewidth"
      name="indexoptions:namewidth">NameWidth=[<em>n</em> | *]
      (<em>Apache 1.3.2 and later</em>)</a></dt>

      <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.</dd>

      <dt><a id="indexoptions:scanhtmltitles"
      name="indexoptions:scanhtmltitles">ScanHTMLTitles</a></dt>

      <dd>

      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.</dd>

      <dt><a id="indexoptions:suppresscolumnsorting"
      name="indexoptions:suppresscolumnsorting">SuppressColumnSorting</a></dt>

      <dd>

      If specified, Apache will not make the column headings in a
      FancyIndexed directory listing into links for sorting. The
      default behavior 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></dd>

      <dt><a id="indexoptions:suppressdescription"
      name="indexoptions:suppressdescription">SuppressDescription</a></dt>

      <dd>

      This will suppress the file description in fancy indexing
      listings. By default, no file descriptions are defined, and
      so the use of this option will regain 23 characters of screen
      space to use for something else. See <a
      href="#adddescription"><samp>AddDescription</samp></a> for
      information about setting the file description. See also the
      <a
      href="#indexoptions:descriptionwidth"><samp>DescriptionWidth</samp></a>
      index option to limit the size of the description
      column.</dd>

      <dt><a id="indexoptions:suppresshtmlpreamble"
      name="indexoptions:suppresshtmlpreamble">SuppressHTMLPreamble</a>
      (<em>Apache 1.3 and later</em>)</dt>

      <dd>

      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 (&lt;HTML&gt;, &lt;HEAD&gt;, <em>et
      cetera</em>). The SuppressHTMLPreamble option disables this
      behavior, 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.</dd>

      <dt><a id="indexoptions:suppresslastmodified"
      name="indexoptions:suppresslastmodified">SuppressLastModified</a></dt>

      <dd>

      This will suppress the display of the last modification date,
      in fancy indexing listings.</dd>

      <dt><a id="indexoptions:suppresssize"
      name="indexoptions:suppresssize">SuppressSize</a></dt>

      <dd>

      This will suppress the file size in fancy indexing
      listings.</dd>

      <dt><a id="indexoptions:trackmodified"
      name="indexoptions:trackmodified">TrackModified (<em>Apache
      1.3.15 and later</em>)</a></dt>

      <dd>

      This returns the Last-Modified and ETag values for the listed
      directory in the HTTP header. It is only valid if the
      operating system and file system return legitimate stat()
      results. Most Unix systems do so, as do OS2's JFS and Win32's
      NTFS volumes. OS2 and Win32 FAT volumes, for example, do not.
      Once this feature is enabled, the client or proxy can track
      changes to the list of files when they perform a HEAD
      request. Note some operating systems correctly track new and
      removed files, but do not track changes for sizes or dates of
      the files within the directory.</dd>
    </dl>

    <p>There are some noticeable differences in the behavior 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:</p>

        <blockquote>
<pre>
&lt;Directory /web/docs&gt;
    IndexOptions FancyIndexing
&lt;/Directory&gt;
&lt;Directory /web/docs/spec&gt;
    IndexOptions ScanHTMLTitles
&lt;/Directory&gt;
</pre>
        </blockquote>
        then only <code>ScanHTMLTitles</code> will be set for the
        /web/docs/spec directory.
      </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&nbsp;FancyIndexing&nbsp;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&nbsp;FancyIndexing&nbsp;+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 id="indexorderdefault"
    name="indexorderdefault">IndexOrderDefault</a> directive</h2>

    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> IndexOrderDefault
    Ascending|Descending Name|Date|Size|Description <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 id="readmename" name="readmename">ReadmeName</a>
    directive</h2>

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

    <p><!--#include virtual="footer.html" -->
    </p>
  </body>
</html>