File: appendixB.html

package info (click to toggle)
wn 2.0.5-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,208 kB
  • ctags: 1,499
  • sloc: ansic: 14,439; sh: 2,430; perl: 1,360; makefile: 291
file content (1921 lines) | stat: -rw-r--r-- 74,270 bytes parent folder | download
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
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<html>
  <head>
    <title>Index File Directives for the WN Server</title>

    <link rev="made" href="mailto:john@math.nwu.edu">

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <meta http-equiv="last-modified" content="Fri, 09 Oct 1998 18:18:09 GMT">
    <meta http-equiv="keywords" content="WN server options">
  </head>

  <body bgcolor="#FFFFFF">
    <p>
      <a href="http://hopf.math.nwu.edu/"><img
        src="images/powered.jpg"
        border="0"
        width="190"
        height="41"
        align="right"
        alt="WN home page"
      ></a>
    </p>

    <strong>Version 2.0.3</strong>

    <br>

    <!-- pnuts --> <a href="appendixA2.html">[Previous]</a> <a href="appendixC.html">[Next]</a> <a href="manual.html">[Up]</a> <a href="manual.html">[Top]</a> <a href="dosearch.html">[Search]</a> <a href="docindex.html">[Index]</a>



    <br clear="right">

    <hr size="4">
    <!-- #start -->

    <h2 align="center">Index File Directives for the <em>WN</em> Server</h2>
    <hr size="4">

    <p>
      This is a list of the items which may be placed in an <a
      href="index_desc.html#index"><code>index</code></a> file to be processed
      by <a href="index_desc.html#wndex"><code>wndex</code></a>. This file
      consists of a collection of <em>records</em> each of which consists of a
      group of lines pertaining to single file.  Each line of a record begins
      with a <em>directive</em> like "<code><a
      href="#fdir.title">Title=</a></code>" which indicates that the remainder
      of that line is to be take as the title of the document whose record
      contains this line.  The "<code><a href="#fdir.file">File=</a></code>"
      directive is special in that it indicates the beginning of a new record.
      The value of the "<code><a href="#fdir.file">File=</a></code>" directive
      is the name of the file whose record will follow.  Letter case is not
      significant in directive keywords.
    </p>

    <p>
      When the character '<code>#</code>' is encountered in an <a
      href="index_desc.html#index"><code>index</code></a> file it is assumed to
      be the start of a comment and everything after it on that line is
      ignored.  To include the '<code>#</code>' character in, for example, a
      document title, it must be escaped with the '<code>\</code>' character.
      That is. when "<code>\#</code>" is encountered it does not signify a
      comment and the character '<code>#</code>' (without the backslash) is
      treated as a normal character.  In fact, since all directives contain the
      character '<code>=</code>', all lines which do not contain this character
      are silently ignored.  Also a single conceptual line of an <a
      href="index_desc.html#index"><code>index</code></a> file can be spread
      over several actual lines by ending all but the last line with the
      '<code>\</code>' character.  That is, if a line ends with
      '<code>\</code>' that character is removed and the contents of the next
      line is considered a continuation of the current line.  The maximum
      allowed length of a line (including continuation) is 1024 characters.
      The maximum allowed length of all the records corresponding to one
      document is 8192 characters.
    </p>

    <p>
      The first record in an <a
      href="index_desc.html#index"><code>index</code></a> file is special and
      is intended to describe attributes of the entire directory rather than
      individual files.  It contains lines with directives specifying
      attributes of the directory as a whole or all the files in it.  The next
      section is a complete list of these directory directives.
    </p>



    <h3>B.1 <a name="ddir">Directory Directives</a></h3>

    <dl>
      <dt>
        <a name="ddir.accessfile">Accessfile</a> -- Specify directory
        access control file.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Accessfile=/dir/accessfile
          </code>
        </blockquote>

        <p>
          specifies that the file <code>/dir/accessfile</code> is to be used to
          determine access privileges (by hostname or IP address) for this
          directory.  If this line is omitted access is allowed for everyone.
          Both the path <code>/dir/accessfile</code> and the path
          <code>~/dir/accessfile</code> are taken relative to the <em>WN</em>
          root directory.  In particular the accessfile must be in the
          <em>WN</em> hierarchy (unlike includes or filters, for example.) If
          the path does not begin with a '<code>/</code>' or a '<code>~</code>'
          then it is relative to the directory containing the <a
          href="index_desc.html#index"><code>index</code></a> file.  See the
          chapter "<a href="access.html">Limiting Access to Your <em>WN</em>
          Hierarchy</a>" in this guide.
        </p>
      </dd>

      <dt>
        <a name="ddir.access-denied-url"><code>Access-denied-URL</code></a> --
        Set URL for requests for which access is denied.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Access-denied-URL=http://host/dir/foo.html
          </code>
        </blockquote>

        <p>
          or the line:
        </p>

        <blockquote>
          <code>
            Access-denied-URL=/dir/foo.html
          </code>
        </blockquote>

        <p>
          specifies that any request for a document in this directory which is
          denied because of an "<code><a
          href="#ddir.accessfile">Accessfile=</a></code>" restriction should be
          redirected to the given URL.  A default value for all directories can
          be set by uncommenting the "<a
          href="configmacros.html#ACCESS_DENIED_URL"><code>#define&nbsp;ACCESS_DENIED_URL</code></a>"
          line in <a href="configmacros.html"><code>config.h</code></a> and
          recompiling.  If you use this directive be sure that the file
          <code>foo.html</code> does not have restricted access or you can
          create an infinite loop.  This line has the special feature that it
          can also be placed as the first line of the "<code><a
          href="#ddir.accessfile">Accessfile=</a></code>" controlling the
          directory.  A line in the accessfile will override any value set in
          the <a href="index_desc.html#index"><code>index</code></a> file.
        </p>
      </dd>

      <dt>
        <a name="ddir.attributes"><code>Attributes</code></a> -- Set
        directory attributes.
      </dt>
      <dd>
        <p>
          Currently there are only two directory attributes,
          viz. "<code>nosearch</code>" and "<code>serveall</code>".
          Letter case is not significant in the attribute value.
        </p>

        <dl>
          <dt>
            <a
            name="ddir.attributes.serveall"><code>Attributes=serveall</code></a>
          </dt>
          <dd>
            <p>
              Specifies that any file, with a few exceptions, in this
              directory may be served not just those listed in the <a
              href="index_desc.html#index"><code>index</code></a> file.  The
              server will attempt to set the content type correctly based on
              the file name suffix using the same default correspondences
              between type and suffix that <a
              href="index_desc.html#wndex"><code>wndex</code></a> uses.  The
              exceptions are that files whose name starts with
              '<code>.</code>' or ends with '<code>~</code>' as well as the
              files "<code>index</code>" and "<code>index.cache</code>" will
              not be served.
            </p>

            <blockquote>
              <em>Note:</em> When this directive is used in a directory
              protected by an "<code><a
              href="#ddir.accessfile">Accessfile=</a></code>" or a <a
              href="access.html#authenticate">password file</a> be sure that
              these files have names that start with '<code>.</code>', or
              contain a '<code>~</code>'.  Or better, put these files in a
              different directory from which nothing is served.
            </blockquote>
          </dd>

          <dt>
            <a
            name="ddir.attributes.nosearch"><code>Attributes=nosearch</code></a>
          </dt>
          <dd>
            <p>
              Specifies that the <code>index.cache</code> databases in the
              current directory and its subdirectories should not be searched
              when the server does a <a href="search.html#title">title</a>, <a
              href="search.html#keyword">keyword</a> or <a
              href="search.html#fielded">user supplied field</a> search.
              Likewise <a href="search.html#context">context</a> and <a
              href="search.html#grep">grep</a> searches will not be allowed in
              this directory.  In this case when an attempt is made to do so an
              error message is returned to the client.  It is also possible to
              exclude only some files from searching with the "<code><a
              href="#fdir.attributes">Attributes=</a></code>" file directive.
            </p>
          </dd>
        </dl>
      </dd>

      <dt>
        <a
        name="ddir.authorization-module"><code>Authorization-Module</code></a>,
        <a
        name="ddir.authorization-realm"><code>Authorization-Realm</code></a>,
        <a name="ddir.authorization-type"><code>Authorization-Type</code></a>
        -- Specify authorization module.
      </dt>
      <dd>
        <p>
          Currently <em>WN</em> includes a "basic" authorization module called
          <a name="module.html#authorization"><code>wnauth</code></a>.  Its use
          is described in the chapter "<a
          href="access.html#authenticate">Limiting Access to Your <em>WN</em>
          Hierarchy</a>".  Alternatively you can make your own module to handle
          authorization.  Data is placed in <a href="appendixD.html">CGI
          environment variables</a>.  <em>WN</em> expects this module to exit
          with status 0 if authorization is granted and with status 1 if access
          is denied.
        </p>

        <p>
          For security reasons when you use an
          "<code>Authorization-Module=</code>" you are required to use either
          the <a href="appendixA1.html#t_opt"><code>-t</code></a> or <a
          href="appendixA1.html#T_opt"><code>-T</code></a> options or the <a
          href="appendixA1.html#a_opt"><code>-a</code></a> or <a
          href="appendixA1.html#A_opt"><code>-A</code></a> options and to have
          the <code>index.cache</code> file in the protected directory owned by
          the trusted user or group.  This is to guard against counterfeit
          authorization modules.
        </p>
      </dd>

      <dt>
        <a
        name="ddir.auth-denied-file"><code>Auth-denied-file</code></a>
        -- Specify the name of an HTML file to be used as the error message
        when an authentication attempt for a password protected directory
        fails.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Auth-denied-file=~/dir/foo.html
          </code>
        </blockquote>

        <p>
          specifies that any request for a document in this directory which is
          denied because of an authorization module restriction results in the
          file <code>~/dir/foo.html</code> being sent instead.  A default value
          for all directories can be set by uncommenting the "<a
          href="configmacros.html#AUTH_DENIED_FILE"><code>#define&nbsp;AUTH_DENIED_FILE</code></a>"
          line in <a href="configmacros.html"><code>config.h</code></a> and
          recompiling.  Note that this is not a URL but the name of a file
          whose content is to be sent as error text when authentication is
          denied.  If the file name starts with '<code>~/</code>' as above it
          is assumed to be relative to the <em>WN</em> root directory.
          Otherwise it is assumed to be a path relative to the directory
          containing the <a href="index_desc.html#index"><code>index</code></a>
          file.
        </p>
      </dd>

      <dt>
        <a name="ddir.cache-module"><code>Cache-Module</code></a> --
        Specify program to be used as interface to database for
        <code>index.cache</code> entries.
      </dt>
      <dd>
        <p>
          If this line specifies a program then instead of looking for file
          entries in the <code>index.cache</code> file this program is executed
          after putting the base name of the URL in the environment variable <a
          href="appendixD.html#wn_key.WN_KEY"><code>WN_KEY</code></a>.  This
          provides a mechanism to use a real database rather than the file
          <code>index.cache</code>.  Note that the directory directives are
          still obtained from <code>index.cache</code>.  The output of this
          module must be in the format of an <code>index.cache</code> line.  <a
          href="search.html#title">Title</a>, <a
          href="search.html#keyword">keyword</a> and <a
          href="search.html#grep">grep</a> are not supported since that would
          require reading the entire database.
        </p>
      </dd>

      <dt>
        <a name="ddir.default-attributes"><code>Default-Attributes</code></a>
        -- Specify the default value of <a href="#fdir.attributes">file
        attributes directive</a> for every file served from this directory.
        This directive should not be confused with the <a
        href="#ddir.attributes">directory attributes directive</a>.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Default-Attributes=parse,dynamic
          </code>
        </blockquote>

        <p>
          specifies that files in this directory should be parsed and marked
          as dynamic documents unless they have an attributes directive
          specifying the contrary.
        </p>
      </dd>

      <dt>
        <a name="ddir.default-cgi-handler"><code>Default-CGI-Handler</code></a>
        -- Specify a default value for the "<code><a
        href="#fdir.cgi_handler">CGI-Handler=</a></code>" file directive.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Default-CGI-Handler=~/dir/handler.cgi
          </code>
        </blockquote>

        <p>
          specifies that files in this directory should all be treated as if
          the "<code><a href="#fdir.cgi_handler">CGI-Handler=</a></code>" file
          directive had been set to <code>wnroot/dir/handler.cgi</code>.  To
          override this setting and specify no CGI handler use the
          "<code>CGI-Handler=&lt;none&gt;</code>" directive.
        </p>
      </dd>

      <dt>
        <a name="ddir.default-content"><code>Default-Content</code></a> --
        Specify the default <a
        href="http://linux-howto.com/rfc/rfc2000-2499/rfc2045.txt">MIME</a>
        content type for items in this directory.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Default-content=text/html
          </code>
        </blockquote>

        <p>
          specifies that files in this directory which do not end in a suffix
          recognizable to <a
          href="index_desc.html#wndex"><code>wndex</code></a> should be given
          the type "<code>text/html</code>".  Any legitimate <a
          href="http://linux-howto.com/rfc/rfc2000-2499/rfc2045.txt">MIME</a>
          type may be used as the value.
        </p>
      </dd>

      <dt>
        <a
        name="ddir.default-document"><code>Default-Document</code></a>
        -- Specify the default document for this directory.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Default-Document=foo.html
          </code>
        </blockquote>

        <p>
          specifies that a URL pointing to this directory like
          <code>http://host/dir/</code> will result in serving the document
          <code>wnroot/dir/foo.html</code> instead of
          <code>wnroot/dir/index.html</code>.  Uses of this include making the
          default document a <a href="cgi.html">CGI program</a> with
          "<code>Default-Document=foo.cgi</code>" or having a directory with
          HTML files all ending with the suffix "<code>.htm</code>" and using
          the directive "<code>Default-Document=foo.htm</code>".  This
          directive applies only to the directory containing the <a
          href="index_desc.html#index"><code>index</code></a> file, not to any
          subdirectories.
        </p>

      <dt>
        <a name="ddir.default-filter"><code>Default-Filter</code></a> --
        Specify a default value for the "<code><a
        href="#fdir.filter">Filter=</a></code>" file directive.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Default-Filter=/path2/filter
            </code>
        </blockquote>

        <p>
          specifies that files in this directory should all be treated as if
          the "<code><a href="#fdir.filter">Filter=</a></code>" file directive
          had been set to <code>/path2/filter</code>.  To override this setting
          and specify no filter use the "<code>Filter=&lt;none&gt;</code>" file
          directive.
        </p>
      </dd>

      <dt>
        <a name="ddir.default-includes"><code>Default-Includes</code></a> --
        Specify a default value for the "<code><a
        href="#fdir.includes">Includes=</a></code>" file directive.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Default-Includes=footer.html
          </code>
        </blockquote>

        <p>
          specifies that this line should be used as the "<code><a
          href="#fdir.includes">Includes=</a></code>" directive for any
          document in this directory which does not have an "<code><a
          href="#fdir.includes">Includes=</a></code>" directive explicitly set.
          To override this default value simply specify an explicit "<code><a
          href="#fdir.includes">Includes=</a></code>" directive or use "<code><a
          href="#fdir.includes">Includes=</a>&lt;none&gt;</code>" to have none.
        </p>
      </dd>

      <dt>
        <a
        name="ddir.default-list-includes"><code>Default-List-Includes</code></a>
        -- Specify a default value for the "<code><a
        href="#fdir.list-includes">List-Includes=</a></code>" file directive.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Default-List-Includes=header.html,footer.html,disclaimer.html
          </code>
        </blockquote>

        <p>
          specifies that this line should be used as the "<code><a
          href="#fdir.list">List-Includes=</a></code>" directive for any
          document in this directory which does not have an "<code><a
          href="#fdir.includes">Includes=</a></code>", "<code><a
          href="#fdir.wrappers">Wrappers=</a></code>", or "<code><a
          href="#fdir.list-includes">List-Includes=</a></code>" directive
          explicitly set.  To override this default value simply specify an
          explicit "<code><a
          href="#fdir.list-includes">List-Includes=</a></code>" directive or
          use "<code><a
          href="#fdir.list-includes">List-Includes=</a>&lt;none&gt;</code>" to
          have none.  Note that the example above grants permission for the
          inclusion of the three files listed.  It does not require their
          insertion.  However, it does cause all files in the current directory
          to be parsed for includes unless this "<code><a
          href="#fdir.attributes">Attributes=</a></code>" is overridden.
        </p>
      </dd>

      <dt>
        <a name="ddir.default-max-age"><code>Default-Max-Age</code></a> --
        Specify the default value for the "<code><a
        href="#fdir.max-age">Max-Age=</a></code>" file directive.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Default-Max-Age=2 weeks
          </code>
        </blockquote>

        <p>
          specifies the Cache-Control and Expires headers of all documents
          served from this directory should be set to expire the document 2
          weeks after it is served.
        </p>

        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Default-Max-Age=2 weeks after last-mod
          </code>
        </blockquote>

        <p>
          specifies the Cache-Control and Expires headers of all documents
          served from this directory should be set to expire the document 2
          weeks after the last-modified date of the document. For more details
          see the "<code><a href="#fdir.max-age">Max-Age=</a></code>" file
          directive.
        </p>
      </dd>

      <dt>
        <a name="ddir.default-wrappers"><code>Default-Wrappers</code></a> --
        Specify a default value for the "<code><a
        href="#fdir.wrappers">Wrappers=</a></code>" file directive.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Default-Wrappers=wrapper.html
          </code>
        </blockquote>

        <p>
          specifies that this line should be used as the "<code><a
          href="#fdir.wrappers">Wrappers=</a></code>" file directive for any
          document in this directory which does not have a
          <code>Wrappers=</code> directive explicitly set.  To override this
          default value simply specify an explicit "<code><a
          href="#fdir.wrappers">Wrappers=</a></code>" directive or use
          "<code><a href="#fdir.wrappers">Wrappers=</a>&lt;none&gt;</code>" to
          have none.
        </p>
      </dd>

      <dt>
        <a name="ddir.file-module"><code>File-Module</code></a> --
        Specify program to be used as interface to database for obtaining
        files.
      </dt>
      <dd>
        <p>
          If this line specifies a program then instead of looking for a file
          in the current directory this program is executed after putting the
          base name of the URL in the environment variable <a
          href="appendixD.html#WN_KEY"><code>WN_KEY</code></a>.  The output of
          this program is served as if it were a file. This provides a
          mechanism to use a real database rather than the file
          <code>index.cache</code>.
        </p>

        <p>
          If you wish the file module to have access to all the standard <a
          href="appendixD.html">CGI environment variables</a> then use the
          directive "<code><a
          href="#ddir.default-attributes">Default-Attributes=cgi</a></code>"
          with the <code>File-Module=</code> directive
        </p>
      </dd>

      <dt>
        <a name="ddir.nomatchsub"><code>Nomatchsub</code></a> -- Set
        substitute file for searches on this directory which result in no
        matches.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Nomatchsub=foo.html
          </code>
        </blockquote>

        <p>
          specifies that the HTML file <code>foo.html</code> in the current
          directory should be used for the output of all searches (<a
          href="search.html#title">title</a>, <a
          href="search.html#keyword">keyword</a>, <a
          href="search.html#context">context</a>, <a
          href="search.html#grep">grep</a>, etc.) on this directory which
          return no matches.  It can only be used in conjunction with the
          "<code><a href="#fdir.searchwrapper">Searchwrapper=</a></code>" file
          directive.  If <code>Nomatchsub=</code> is used and a "<code><a
          href="#fdir.searchwrapper">Searchwrapper=</a></code>" has not been
          defined an error is logged and the nomatchsub file is ignored.  The
          file <code>foo.html</code> must be in the directory being searched
          and its name must not contain a '<code>/</code>'.  See also "<code><a
          href="#fdir.nomatchsub">Nomatchsub=</a></code>" for files.
        </p>
      </dd>

      <dt>
        <a
        name="ddir.no-such-file-url"><code>No-Such-File-URL</code></a>
        -- Set substitute URL for requests for non-existent or unservable
        files.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            No-Such-File-URL=http://host/dir/foo.html
          </code>
        </blockquote>

        <p>
          or the line:
        </p>

        <blockquote>
          <code>
            No-Such-File-URL=/dir/foo.html
          </code>
        </blockquote>

        <p>
          specifies that any request in this directory for a non-existent file
          or a file not listed in the <a
          href="index_desc.html#index"><code>index</code></a> file of this
          directory should be redirected to the given URL.  A default value
          for all directories and non-existent directories can be set by
          uncommenting the "<a
          href="configmacros.html#no_such_file_url"><code>#define&nbsp;NO_SUCH_FILE_URL</code></a>"
          line in <a href="configmacros.html"><code>config.h</code></a>
          and recompiling.  The value set here will also be used if an
          <code>index.cache</code> file does not exist.  If you use this
          directive be sure that the file <code>foo.html</code> <em>does
          exist</em> or you can create an infinite loop.
        </p>
      </dd>

      <dt>
        <a name="ddir.owner"><code>Owner</code></a> -- Specify owner
        of directory items.
      </dt>
      <dd>
        <p>
          This should be a line like:
        </p>

        <blockquote>
          <code>
            Owner=mailto:maintainer@host
          </code>
        </blockquote>

        <p>
          The "<code>mailto:maintainer@host</code>" may be replaced with a URL
          referring to the individual who is responsible for the documents in
          this directory.  This information is used in an HTTP header.  It is
          not possible to designate the owner of a single file in a file
          directive.  However, if the file is an HTML file this can be done
          with a <a
          href="http://www.htmlhelp.com/???"><code>&lt;link&gt;</code></a> tag
          in the header of that file.
        </p>
      </dd>

      <dt>
        <a name="ddir.search-module"><code>Search-Module</code></a> --
        Specify program to be used as a search engine.
      </dt>
      <dd>
        <p>
          This directive allows you to create your own search engine.  It is
          invoked with a line like:
        </p>

        <blockquote>
          <code>
            Search-Module=/full/path/to/searchmod
          </code>
        </blockquote>

        <p>
          The program <code>searchmod</code> should read the environment
          variable <a
          href="appendixD.html#cgi.QUERY_STRING"><code>QUERY_STRING</code></a>
          and return an HTML fragment.  In the typical case the program returns
          an unordered list of links to documents containing a match to the
          query string.  This list can be wrapped by including a "<code><a
          href="#ddir.searchwrapper">Searchwrapper=</a></code>" in the
          directory record.  If it is not, a default wrapper with text like
          "<code>Here are the matches for your search.</code>" is supplied.
        </p>

        <p>
          To use this module you should have a form action which is something
          like <code>http://host/dir/search=index</code>.  Two simple examples
          of a search-module (written in <a
          href="http://www.perl.org">perl</a>) are included in the distribution
          in the files <code>bin/wnseven_m</code> and
          <code>bin/wnsectsearch</code>.
        </p>
      </dd>

      <dt>
        <a name="ddir.searchwrapper"><code>Searchwrapper</code></a> --
        Set wrapper file for searches on this directory.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Searchwrapper=swrap.html
          </code>
        </blockquote>

        <p>
          specifies that the HTML file <code>swrap.html</code> in the current
          directory should be used as a wrapper for the output of all searches
          on this directory.
        </p>

        <p>
          To specify a wrapper for searches on an individual file use the file
          directive "<code><a
          href="#fdir.searchwrapper">Searchwrapper=</a></code>".
        </p>
      </dd>

      <dt>
        <a name="ddir.subdirs"><code>Subdirs</code></a> -- Specify
        subdirectories for searching and recursive use of <a
        href="index_desc.html#wndex"><code>wndex</code></a>.
      </dt>
      <dd>
        <p>
          When you run the <a
          href="index_desc.html#wndex"><code>wndex</code></a> utility with the
          <a href="appendixA2.html#r_opt"><code>-r</code></a> option (for
          recursive), it must know in which subdirectories it should descend
          to create a new <code>index.cache</code> database file.  Likewise
          when the server does a <a href="search.html#title">title</a>, <a
          href="search.html#keyword">keyword</a> or <a
          href="search.html#fielded">user defined field</a> search it
          recursively descends the data hierarchy and must know for each
          directory which subdirectories are part of the hierarchy.
        </p>

        <p>
          The maintainer provides this information in a line like:
        </p>

        <blockquote>
          <code>
            Subdirs=subdir1,subdir2,subdir3
          </code>
        </blockquote>

        <p>
          in the directory directives giving a comma separated list of
          subdirectories of the directory containing the current <a
          href="index_desc.html#index"><code>index</code></a> file.
        </p>

        <p>
          There are two special forms of the "<code>Subdirs=</code>" directive.
          Using:
        </p>

        <blockquote>
          <code>
            Subdirs=&lt;index&gt;
          </code>
        </blockquote>

        <p>
          is equivalent having a "<code>Subdirs=</code>" directive whose value
          is a list of all subdirectories which contain a file named
          "<code>index</code>" (or the name specified with the <a
          href="appendixA2.html#i_opt"><code>-i</code></a> option to <a
          href="index_desc.html#wndex"><code>wndex</code></a>).
        </p>

        <p>
          Using:
        </p>

        <blockquote>
          <code>
            Subdirs=&lt;all&gt;
          </code>
        </blockquote>

        <p>
          is equivalent having a "<code>Subdirs=</code>" directive whose value
          is a list of all subdirectories.
        </p>
      </dd>
    </dl>


    <h3>B.2 <a name="fdir">File Directives</a></h3>

    <p>
      A collection of lines in the <a
      href="index_desc.html#index"><code>index</code></a> file containing
      information about a single file in the directory of the <a
      href="index_desc.html#index"><code>index</code></a> file is called a file
      record.  A new file record begins with a line starting with "<code><a
      href="#fdir.file">File=</a></code>" and ends with the start of a new file
      record.  Each line in a record begins with a file directive. Here is the
      complete list:
    </p>

    <dl>
      <dt>
        <a name="fdir.attributes"><code>Attributes</code></a> -- Set file
        attributes.
      </dt>
      <dd>
        <p>
          Currently several possible attributes are possible including
          <code>imagemap</code>, <code>nosearch</code>, <code>parse</code>,
          <code>noparse</code>, <code>post</code>, <code>nopost</code>,
          <code>dynamic</code>, <code>nondynamic</code>, <code>cachable</code>,
          <code>non-cachable</code>, <code>put</code>, and <code>cgi</code>.
          Multiple values, separated by commas can be put on a single
          "<code>Attributes=</code>" line, as in
          "<code>Attributes=parse,dynamic,nosearch</code>".  Letter case is not
          significant in the attribute value.  Also "<code>Attribute=</code>"
          (without the '<code>s</code>') is synonymous with
          "<code>Attributes=</code>".
        </p>

        <p>
          See also the directory "<code><a
          href="#ddir.attributes">Attributes=</a></code>" directive.
        </p>

        <dl>
          <dt>
            <a
            name="fdir.attributes.cachable"><code>Attributes=cachable</code></a>
          </dt>
          <dd>
            <p>
              causes the server not to send the
              "<code>Pragma:&nbsp;no-cache</code>" and
              "<code>Cache-control:&nbsp;no-cache</code>" headers when it
              otherwise might.  For example these headers are sent by default
              for <a href="cgi.html">CGI</a> output.  If you want the browser
              "back" button to return users to a a CGI generated page after
              they have followed a link you may need
              "<code>Attributes=cachable</code>" since otherwise the browser
              may not even cache the page in memory.  (See also "<a
              href="#fdir.attributes.non-cachable"><code>Attributes=non-cachable</code></a>".)
            </p>
          </dd>

          <dt>
            <a name="fdir.attributes.cgi"><code>Attributes=cgi</code></a>
          </dt>
          <dd>
            <p>
              indicates that the standard <a href="appendixD.html">CGI
              environment variables</a> should be set up before processing this
              request.  This is may be useful if there is a "<code><a
              href="#fdir.filter">Filter=</a></code>" directive for this
              document or if the document has a "<code><a
              href="#fdir.includes">Include=</a></code>" which is the output of
              a program.  In these cases the filter program or include program
              can access the CGI environment variables.  This line is not
              necessary if the document it refers to is actually a <a
              href="cgi.html">CGI program</a> since in that case this attribute
              is automatically set.  If the document is not actually a <a
              href="cgi.html">CGI program</a> then the environment variable <a
              href="appendixD.html#PATH_INFO"><code>PATH_INFO</code></a> will
              always be empty.  This is because the server always interprets a
              request without a "<code>.cgi</code>" suffix or a
              "<code>cgi-bin</code>" directory in it as the longest possible
              sequence of directories and a terminating file, i.e. a request
              without <code>PATH_INFO</code>.
            </p>
          </dd>

          <dt>
            <a name="fdir.attributes.dynamic"><code>Attributes=dynamic</code></a>
          </dt>
          <dd>
            <p>
              indicates that the document may change each time it is sent.
              This causes the server not to send headers with a content length
              or a last modified date.  It also will cause the server to ignore
              any "<code>If-Modified-Since</code>" date sent by the client and
              always resend the document.  It is not necessary to set
              <code>Attributes=dynamic</code> for <a href="cgi.html">CGI
              programs</a> as it is set by default for them.  If you do not
              wish this done for a <a href="cgi.html">CGI program</a> then use
              the directive "<code><a
              href="#fdir.attributes.nondynamic">Attributes=nondynamic</a></code>".
            </p>
          </dd>

          <dt>
            <a
            name="fdir.attributes.imagemap"><code>Attributes=imagemap</code></a>
          </dt>
          <dd>
            <p>
              Indicates that the file is an imagemap used to support <a
              href="click.html">clickable images</a>.
            </p>
          </dd>

          <dt>
            <a name="fdir.attributes.md5"><code>Attributes=MD5</code></a>
          </dt>
          <dd>
            <p>
              Indicates that <a
              href="index_desc.html#wndex"><code>wndex</code></a> should
              calculate an <a
              href="http://linux-howto.com/rfc/rfc1000-1499//rfc1321.txt">MD5</a>
              digest or checksum for this file and store it in the
              <code>index.cache</code> file for use as in a
              "<code>Content-MD5</code>" header for this document.  If the
              document is subsequently modified you must <em>re-run</em> <a
              href="index_desc.html#wndex"><code>wndex</code></a> to
              recalculate this digest value.  If this is not done and the
              document is newer than the calculated MD5 digest, the server will
              omit the "<code>Content-MD5</code>" header and log an error.
            </p>
          </dd>

          <dt>
            <a
            name="fdir.attributes.non-cachable"><code>Attributes=non-cachable</code></a>
          </dt>
          <dd>
            <p>
              indicates that the server should send the
              "<code>Pragma:&nbsp;no-cache</code>" and
              "<code>Cache-control:&nbsp;no-cache</code>" headers attempting
              to encourage clients and proxies not to cache this document.  It
              is not necessary to set this for <a href="cgi.html">CGI
              programs</a> or any document requiring authentication as it is
              set by default for them.  If you wish to allow the output of a
              <a href="cgi.html">CGI program</a> or authenticated document to
              be cached then use the line:
            </p>

            <blockquote>
              <code>
                <a href="#fdir.attributes.cachable">Attributes=cachable</a>
              </code>
            </blockquote>

            <p>
              which will override this default. This may be necessary if you
              want the browser "back" button to return users to this document
              after they have followed a link, since otherwise the browser may
              not even cache the page in memory.
            </p>
          </dd>

          <dt>
            <a
            name="fdir.attributes.nondynamic"><code>Attributes=nondynamic</code></a>
          </dt>
          <dd>
            <p>
              overrides the default CGI setting of "dynamic". If this is done
              the "<code>Last-Modified</code>" date header of the document
              will be that of the program.
            </p>
          </dd>

          <dt>
            <a
            name="fdir.attributes.noparse"><code>Attributes=noparse</code></a>
          </dt>
          <dd>
            <p>
              indicates that the file referenced by this directive should not
              be parsed for server includes.  This is used to override a
              default attributes setting to parse all documents.  Also this
              might be done to improve efficiency when, for example, a
              document has a wrapper but nothing is included in it.  Since it
              has a wrapper parsing will be turned on by default, but it is
              not necessary since nothing is actually included.
            </p>
          </dd>

          <dt>
            <a name="fdir.attributes.nopost"><code>Attributes=nopost</code></a>
          </dt>
          <dd>
            <p>
              indicates that the file referenced by this directive may not be
              accessed with the <a
              href="http://www.htmlhelp.com/reference/wilbur/block/form.html"><code>POST</code></a>
              method.  If the item referenced is an ordinary file this
              directive is assumed and need not be set.  For <a
              href="cgi.html">CGI programs</a>, if this is set and an attempt
              to <a
              href="http://www.htmlhelp.com/reference/wilbur/block/form.html"><code>POST</code></a>
              to the object is made by a client an error will be returned.
            </p>
          </dd>

          <dt>
            <a
            name="fdir.attributes.nosearch"><code>Attributes=nosearch</code></a>
          </dt>
          <dd>
            <p>
              indicates that the file referenced by this directive should not
              be searched when the server does a <a
              href="search.html#context">context</a> or <a
              href="search.html#grep">grep</a> search of the current
              directory.
            </p>
          </dd>

          <dt>
            <a name="fdir.attributes.parse"><code>Attributes=parse</code></a>
          </dt>
          <dd>
            <p>
              indicates that the file referenced by this directive should be
              parsed for <a href="parse.html#if">conditional text</a> or <a
              href="parse.html#including">server-side includes</a>.  This line
              is not necessary if there is also a "<code><a
              href="#fdir.attributes.wrappers">Wrappers=</a></code>" line or an
              "<code><a href="#fdir.attributes.includes">Includes=</a></code>"
              line since in that case the parse attribute is assumed.  If you
              do not wish a document to be parsed when it otherwise would be
              the "<code><a
              href="#fdir.attributes.noparse">Attribute=noparse</a></code>" can
              be used.
            </p>
          </dd>

          <dt>
            <a name="fdir.attributes.post"><code>Attributes=post</code></a>
          </dt>
          <dd>
            <p>
              indicates that the file referenced by this directive may
              <em>only</em> be accessed with the <a
              href="http://www.htmlhelp.com/reference/wilbur/block/form.html"><code>POST</code></a>
              method.  If the item referenced is a <a href="cgi.html">CGI
              program</a> and an attempt is made to access it with the <a
              href="http://www.htmlhelp.com/reference/wilbur/block/form.html"><code>GET</code></a>
              method an error will be returned.  For ordinary files, if this is
              not set and an attempt to to the object is made by a client an
              error will be returned.  This directive may useful for files
              which are filtered or "include" an executed program.  In that
              case the <code>POST</code>ed data will be in placed in a
              temporary file.  The name of the temporary file can be found by
              using "<code><a
              href="#fdir.attributes.cgi">Attributes=cgi</a></code>" which will
              cause the name to be placed in the environment variable <a
              href="appendixD.html#WN_POST_FILE"><code>WN_POST_FILE</code></a>.
            </p>
          </dd>

          <dt>
            <a name="fdir.attributes.put"><code>Attributes=put</code></a>
          </dt>
          <dd>
            <p>
              indicates that the file referenced by this directive may be
              accessed with the <code>PUT</code> method.  It must be handled by
              your program.  The <code>PUT</code> data will be in placed in a
              temporary file.  The name of the temporary file can be found by
              using "<code><a
              href="#fdir.attributes.cgi">Attributes=cgi</a></code>" which will
              cause the name to be placed in the environment variable <a
              href="appendixD.html#WN_PUT_FILE"><code>WN_PUT_FILE</code></a>.
            </p>
          </dd>
        </dl>

      <dt>
        <a name="fdir.cgi-handler"><code>CGI-Handler</code></a> -- Specify the
        <a href="cgi.html">CGI program</a> with which a file is to be
        processed.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            CGI-Handler=bar.cgi
          </code>
        </blockquote>

        <p>
          causes the program "<code>bar.cgi</code>" to be run and its output
          to be served in place of the document requested.  This is a way to
          designate a <a href="cgi.html">CGI program</a> to handle a file
          somewhat like a <a href="filter.html">filter</a>.  The name of the
          program need not be in the URL since it is in the <a
          href="index_desc.html#index"><code>index</code></a> file.  So when
          <code>http://host/path2/foo.html</code> is requested this will cause
          the handler, say <code>bar.cgi</code>, to be run with the CGI
          environment variable <a
          href="appendixD.html#PATH_INFO"><code>PATH_INFO</code></a> set to
          <code>/path2/foo.html</code>.  In normal use the program
          <code>bar.cgi</code> will do something to the file
          <code>foo.html</code> and serve the output.  It is useful if you
          want a number of files in a directory to be handled by the same <a
          href="cgi.html">CGI program</a>.  Note the file
          <code>foo.html</code> need not be used in any way by the program,
          but it must exist or else the server will treat it as a non-existent
          file.
        </p>

        <p>
          If handler name begins with a '<code>/</code>' the name is
          considered as a path relative to the system root directory.  If it
          begins with '<code>~/</code>' as in <code>~/dir/foo</code> it is
          assumed to be relative to the <em>WN</em> root directory.  Otherwise
          it is assumed to be a path relative to the directory containing the
          <a href="index_desc.html#index"><code>index</code></a> file.
        </p>
      </dd>

      <dt>
        <a name="fdir.content-encoding"><code>Content-encoding</code></a> --
        Specify the content encoding for a file.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Content-encoding=x-gzip
          </code>
        </blockquote>

        <p>
          specifies "<code>x-gzip</code>" as the content encoding for the file
          described by this record.  Only two types of content encoding are
          supported by common browsers.  They are "<code>x-gzip</code>" and
          "<code>x-compress</code>".  They indicate that the file has been
          compressed with the <a href="http://www.gnu.org">GNU</a> <a
          href="http://linux-howto.com/man/man1/gzip.1.html"><code>gzip(1)</code></a>
          utility or the UNIX <a
          href="http://linux-howto.com/man/man1/compress.1.html"><code>compress(1)</code></a>
          utility.  The file is then sent by the server in the compressed
          format and will be decompressed automatically by the browser, if it
          supports this functionality.
        </p>

        <p>
          In many cases this is unnecessary to specify this explicitly as the
          <a href="index_desc.html#wndex"><code>wndex</code></a> program will
          automatically assign the the content-encoding <code>x-gzip</code> to
          a file whose name ends with "<code>.gz</code>" and the
          content-encoding <code>x-compress</code> to a file whose name ends in
          "<code>.Z</code>".  Supplying the value "<code>none</code>" for the
          "<code>Content-encoding=</code>" will prevent the server from making
          this automatic assignment.
        </p>
      </dd>

      <dt>
        <a name="fdir.content-type"><code>Content-type</code></a> -- Specify
        the <a
        href="http://linux-howto.com/rfc/rfc2000-2499/rfc2045.txt">MIME</a>
        content type for a file.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Content-type=audio/basic
          </code>
        </blockquote>

        <p>
          specifies "<code>audio/basic</code>" as the <a
          href="http://linux-howto.com/rfc/rfc2000-2499/rfc2045.txt">MIME</a>
          type for the file described by this record.  In many cases this is
          unnecessary as the <a
          href="index_desc.html#wndex"><code>wndex</code></a> program will
          automatically assign the <a
          href="http://linux-howto.com/rfc/rfc2000-2499/rfc2045.txt">MIME</a>
          type if the file name ends in a suffix listed in the file
          <code>lib/mime.types</code> with a corresponding type.  If this line
          is supplied it will override the default value of the content type
          determined by the suffix.
        </p>

        <p>
          The <code>mime.types</code> file should be installed in a known
          location.  The default location is in the <em>WN</em>
          <code>src</code> hierarchy, but this can be changed by specifying a
          different value when the <a
          href="setup.html#installing"><code>configure</code></a> program is
          run or by editing the value of "<a
          href="configmacros.html#mime_types_file"><code>#define&nbsp;MIME_TYPES_FILE</code></a>"
          in <a href="configmacros.html"><code>config.h</code></a>.  The
          <code>mime.types</code> file exists so that you can add to it if you
          wish to add new kinds of documents to your server.  The format of the
          file is explained in the file.  A default version of the file is in
          <code>lib/mime.types</code>.  The internal defaults are the same as
          what is currently in this file.  The <code>mime.types</code> file is
          read whenever <a href="index_desc.html#wndex"><code>wndex</code></a>
          is run so <a href="index_desc.html#wndex"><code>wndex</code></a>
          always knows the latest additions.  This file is also read by
          <code>wnsd</code> (but not <code>wnd</code>) on startup for use with
          directories with the "<code><a
          href="#ddir.attributes.serveall">Attributes=serveall</a></code>".
          The <code>wnsd</code> stand-alone server reads this file when it is
          started or restarted, but only takes note of new suffixes and their
          <code>mime types</code>.  You cannot change the mime type
          corresponding to one of the standard suffixes (as listed in the
          default <code>mime.types</code> file).  To do that you need to change
          the server source and recompile.
        </p>
      </dd>

      <dt>
        <a name="fdir.expires"><code>Expires</code></a> -- Specify the
        expiration date of a document or file.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Expires=Mon,&nbsp;01&nbsp;Sep&nbsp;1997&nbsp;14:11:01&nbsp;GMT
          </code>
        </blockquote>

        <p>
          specifies date and time which a document expires.  Current practice
          is to use the format specified by <a
          href="http://linux-howto.com/rfc/rfc0500-0999/rfc0850.txt">RFC
          850</a> and illustrated above.  In particular, GMT should be used.
          More information about HTTP date formats can be found at <a
          href="http://linux-howto.com/rfc/rfc1000-1499/rfc1123.txt">RFC
          1123</a>.  For HTML documents the this information is automatically
          extracted from the document by <a
          href="index_desc.html#wndex"><code>wndex</code></a>.  This requires a
          "<a
          href="http://www.htmlhelp.com/reference/wilbur/head/meta.html"><code>&lt;meta&gt;</code></a>"
          line in the head of the HTML document like:
        </p>

        <blockquote>
          <code>
            &lt;meta&nbsp;http-equiv="Expires"&nbsp;content="Tue,&nbsp;10&nbsp;Oct&nbsp;1994&nbsp;14:11:01&nbsp;GMT"&gt;
          </code>
        </blockquote>

        <p>
          If the "<code>Expires=</code>" directive is also supplied in the <a
          href="index_desc.html#index"><code>index</code></a> file it will
          override the expiration date in the document. See also the "<code><a
          href="#fdir.max-age">Max-age=</a></code>" file directive.
        </p>
      </dd>

      <dt>
        <a name="fdir.field"><code>Field#n</code></a> -- Specify a user
        supplied field associated with a file.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Field3=string
          </code>
        </blockquote>

        <p>
          specifies "<code>string</code>" user supplied field <code>3</code>
          associated with the current document.  These are used for <a
          href="search.html#fielded">field searches</a>.  The digit
          <code>3</code> can be replaced with any other single digit allowing
          a total of 10 user supplied fields.
        </p>
      </dd>

      <dt>
        <a name="fdir.file"><code>File</code></a> -- File name.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            File=foo
          </code>
        </blockquote>

        <p>
          begins a new file record for the file <code>foo</code>.  It
          indicates that permission is granted for this file to be
          served. Other <a href="#fdir">file directive</a> lines will apply to
          this file until a new file record or text segment is started or the
          end of the <a href="index_desc.html#index"><code>index</code></a>
          file is reached.  The presence of this line causes an entry for this
          file to be written in the <code>index.cache</code> file created by
          <a href="index_desc.html#wndex"><code>wndex</code></a>.
        </p>
      </dd>

      <dt>
        <a name="fdir.filter"><code>Filter</code></a> -- Specify the filter
        with which a file is to be postprocessed.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Filter=/dir/foo
          </code>
        </blockquote>

        <p>
          causes the contents of the file whose record contains this line to be
          used as the UNIX <a
          href="http://linux-howto.com/man/man3/stdio.3.html"><code>stdin(3)</code></a>
          stream of the program <code>foo</code> and the the UNIX <a
          href="http://linux-howto.com/man/man3/stdio.3.html"><code>stdout(3)</code></a>
          stream of that program to be sent to the client instead of the file
          itself.  A common use of this is to specify a decompressing program
          like the UNIX <a
          href="http://linux-howto.com/man/man1/zcat.1.html"><code>zcat(1)</code></a>
          utility as the filter so that a compressed version of a file can be
          stored on disk and then be decompressed on the fly before being sent
          to the client.  Another example would be
          "<code>Filter=/usr/bin/nroff&nbsp;-man</code>" which would convert a
          UNIX <a
          href="http://linux-howto.com/man/man1/nroff.1.html"><code>nroff(1)</code></a>
          utility to convert a <a
          href="http://linux-howto.com/man/man1/man.1.html"><code>man(1)</code></a>
          page to an ASCII text document on the fly.
        </p>

        <p>
          If a listed file name begins with a '<code>/</code>' the name is
          considered as a path relative to the system root directory.  If it
          begins with '<code>~/</code>' as in '<code>~/dir/foo</code>' it is
          assumed to be relative to the <em>WN</em> root directory.  Otherwise
          it is assumed to be a path relative to the directory containing the
          <a href="index_desc.html#index"><code>index</code></a> file.
        </p>
      </dd>

      <dt>
        <a name="fdir.header"><code>Header</code></a> -- Add a line to the <a
        href="http://www.w3c.org/Protocols/">HTTP/1.1</a> header for this
        document.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Header=[some legal HTTP header]
          </code>
        </blockquote>

        <p>
          causes the line "<code>[some legal HTTP header]</code>" to be added
          to the <a href="http://www.w3c.org/Protocols/">HTTP/1.1</a> header
          for this item. This directive can be used multiple times to add
          multiple lines to the header.
        </p>

        <blockquote>
          <em>Note:</em> Don't do this unless you know what you are doing!
        </blockquote>
      </dd>

      <dt>
        <a name="fdir.http-status"><code>HTTP-Status</code></a> -- Return a
        given <a href="http://www.w3c.org/Protocols/">HTTP/1.1</a> status
        value.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            HTTP-Status=404 Not Found
          </code>
        </blockquote>

        <p>
          causes the response line of the <a
          href="http://www.w3c.org/Protocols/">HTTP/1.1</a> header to be
          "<code>HTTP/1.1&nbsp;404&nbsp;Not Found</code>".  This is primarily
          of use when redirecting requests for non-existent files to an error
          message which should be returned with status <code>404</code> so
          robots understand.
        </p>

        <blockquote>
          <em>Note:</em> Don't do this unless you know what you are doing!
        </blockquote>
      </dd>

      <dt>
        <a name="fdir.includes"><code>Includes</code></a> -- Specify the files
        to be included in a text document.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Includes=file1,file2,file3
          </code>
        </blockquote>

        <p>
          causes the file whose record contains this line to be parsed for
          lines like "<code>&lt;!--&nbsp;#include&nbsp;--&gt;</code>".  When
          such a marker is found one of the files listed with the
          "<code>Includes=</code>" file directive is inserted.  Subsequent
          occurrences of the marker cause the inclusion of subsequent files in
          the order in which they occur in this directive.
        </p>

        <p>
          If a listed file name begins with a '<code>/</code>' the name is
          considered as a path relative to the system root directory.  If it
          begins with '<code>~/</code>' as in "<code>~/dir/foo</code>" it is
          assumed to be relative to the <em>WN</em> root directory.  Otherwise
          it is assumed to be a path relative to the directory containing the
          <a href="index_desc.html#index"><code>index</code></a> file.  See
          the section of the user guide on <a href="parse.html">includes and
          wrappers</a> for more information.
        </p>
      </dd>

      <dt>
        <a name="fdir.keywords"><code>Keywords</code></a> -- Specify the
        keywords associated with a document or file.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Keywords=pink, elephant, HTTP
          </code>
        </blockquote>

        <p>
          specifies a list of keywords associated with the current document.
          These are used for <a href="search.html#keyword">keyword
          searches</a>.  For HTML documents the keywords are automatically
          extracted from the document by <a
          href="index_desc.html#wndex"><code>wndex</code></a>.  This requires
          a <a
          href="http://www.htmlhelp.com/reference/wilbur/head/meta.html"><code>&lt;meta&gt;</code></a>
          line in the head of the HTML document like:
        </p>

        <blockquote>
          <code>
            &lt;meta&nbsp;http-equiv="Keywords"&nbsp;content="pink,&nbsp;elephant,&nbsp;HTTP"&gt;
          </code>
        </blockquote>

        <p>
          If the "<code>Keywords=</code>" file directive is also supplied in
          the <a href="index_desc.html#index"><code>index</code></a> file it
          will override the keywords in the document.
        </p>
      </dd>

      <dt>
        <a name="fdir.list-includes"><code>List-Includes</code></a> -- Specify
        files which may be included in a text document.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            List-Includes=file1,file2,file3
          </code>
        </blockquote>

        <p>
          causes the file whose record contains this line to be parsed for
          lines like
          '<code>&lt;!--&nbsp;#include&nbsp;"file2"&nbsp;--&gt;</code>'.  When
          such a marker is found the contents of <code>file2</code> is
          inserted.  The order of the files listed in the directive is not
          significant. Note that the example above grants permission for the
          inclusion of the three files listed.  It does not require their
          insertion.
        </p>

        <p>
          If a listed file name begins with a '<code>/</code>' the name is
          considered as a path relative to the system root directory.  If it
          begins with '<code>~/</code>' as in "<code>~/dir/foo</code>" it is
          assumed to be relative to the <em>WN</em> root directory.  Otherwise
          it is assumed to be a path relative to the directory containing the
          <a href="index_desc.html#index"><code>index</code></a> file.  See
          the section of the user guide on <a href="parse.html">includes and
          wrappers</a> for more information.
        </p>
      </dd>

      <dt>
        <a name="fdir.max-age"><code>Max-Age</code></a> -- Specify the <a
        href="http://www.w3c.org/Protocols/">HTTP/1.1</a>
        <code>Cache-Control</code> and <code>Expires</code> headers for an
        entry.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Max-Age=10&nbsp;days
          </code>
        </blockquote>

        <p>
          specifies that a <a href="http://www.w3c.org/Protocols/">HTTP/1.1</a>
          <code>Cache-Control</code> header should be sent to expire the
          document in the specified time.  If no "<code><a
          href="#fdir.expires">Expires=</a></code>" file directive has been set
          elsewhere in the <a
          href="index_desc.html#index"><code>index</code></a> file or in the
          file itself, if it is an HTML file, then the <a
          href="http://www.w3c.org/Protocols/">HTTP/1.1</a>
          <code>Expires</code> header will also be sent with a value equal to
          the current time plus the time period of the <a
          href="http://www.w3c.org/Protocols/">HTTP/1.1</a>
          <code>Max-Age</code> header.  The time period in the
          "<code>Max-Age=</code>" file directive can be specified in units of
          seconds, minutes, hours, days or weeks, but more than one unit (as in
          2 weeks and 3 days) is not allowed.
        </p>

        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Max-Age=10&nbsp;days&nbsp;after&nbsp;last-mod
          </code>
        </blockquote>

        <p>
          specifies that a <a
          href="http://www.w3c.org/Protocols/">HTTP/1.1</a>
          <code>Cache-Control</code> header and the <code>Expires</code> header
          (if none is set elsewhere) should be set to expire the document in
          the specified amount of time after the <code>last-modified</code>
          date of the document.  Negative time values for the
          <code>Cache-Control</code> header will be ignored, but
          <code>Expires</code> headers with dates in the past will be used.
        </p>
      </dd>

      <dt>
        <a name="fdir.nomatchsubs"><code>Nomatchsub</code></a> -- Set
        substitute file for searches on this file which result in no matches.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Nomatchsub=foo.html
          </code>
        </blockquote>

        <p>
          specifies that the HTML file <code>foo.html</code> in the current
          directory should be used for the output of all <a
          href="search.html">searches</a> on this file which return no matches.
          It can only be used in conjunction with the "<code><a
          href="#fdir.searchwrapper">Searchwrapper=</a></code>" file directive.
          See also "<code><a href="#ddir.nomatchsub">Nomatchsub=</a></code>"
          for directories.
        </p>
      </dd>

      <dt>
        <a name="fdir.redirect"><code>Redirect</code></a> -- Send an <a
        href="http://www.w3c.org/Protocols/">HTTP/1.1</a> redirect to a new
        URL.
      </dt>
      <dd>
        <p>
          The lines:
        </p>

        <blockquote>
          <code>
            File=foo
            <br>
            Redirect=http://host/path/bar
          </code>
        </blockquote>

        <p>
          cause a request for <code>foo</code> to be answered with an <a
          href="http://www.w3c.org/Protocols/">HTTP/1.1</a> redirect response.
          The client will then automatically request the new URL.  The file
          <code>foo</code> need not exist.
        </p>

        <p>
          The redirection always send a <a
          href="http://www.w3c.org/Protocols/">HTTP/1.1</a>
          "<code>301&nbsp;Moved&nbsp;Permanently</code>" status header followed
          by a "<code>Location:</code>" header whose value is
          "<code>http://host/path/bar</code>".  This means that the value of a
          "<code>Redirect=</code>" file directive should always be a complete
          URL, starting with "<code>http://</code>" or "<code>ftp://</code>"
          etc.  The one exception is that you may use
          "<code>Redirect=&lt;null&gt;</code>".  This causes the server to send
          a status <code>204</code> "no response" which tells the client to do
          nothing and leave the display alone.  The page won't be reloaded and
          won't change.
        </p>
      </dd>

      <dt>
        <a name="fdir.refresh"><code>Refresh</code></a> -- Set a "Refresh"
        header for use with "client-pull".
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Refresh=60
          </code>
        </blockquote>

        <p>
          adds an <a href="http://www.w3c.org/Protocols/">HTTP/1.1</a> header
          at the beginning of the transmission of this document.  If the
          client receiving this header supports "client-pull" (currently only
          <a
          href="http://www.netscape.com/download/prodinfonfs_1.html">Netscape
          browsers</a> support this) then it will automatically reload the
          document after 60 seconds.  This is useful for documents that are
          updated very frequently, a stock ticker, for example.  If the
          directive:
        </p>

        <blockquote>
          <code>
            Refresh=30;&nbsp;URL=http://host/path/foo
          </code>
        </blockquote>

        <p>
          is used then after 30 seconds the URL
          <code>http://host/path/foo</code> is loaded.  This can be used to
          create an automatic slide show.  The <code>Refresh</code> header is
          not part of an <a href="http://www.w3c.org/Protocols/">HTTP/1.1</a>
          standard and hence may evolve.  If it does this directive will be
          subject to change!
        </p>
      </dd>

      <dt>
        <a name="fdir.searchwrapper"><code>Searchwrapper</code></a> -- Set
        wrapper file for searches on this file.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Searchwrapper=swrap.html
          </code>
        </blockquote>

        <p>
          specifies that the HTML file <code>swrap.html</code> in the current
          directory should be used as a <a
          href="search.html#searchwrapper">search wrapper</a> for the output
          of all <a href="search.html">searches</a> on this file.
        </p>

        <p>
          To specify a wrapper for all searches on a directory use the
          directory directive "<code><a
          href="#ddir.searchwrapper">Searchwrapper=</a></code>".
        </p>
      </dd>

      <dt>
        <a name="fdir.cookie"><code>Set-Cookie</code></a> -- Set a "Cookie"
        header value.
      </dt>
      <dd>
        <p>
          The lines:
        </p>

        <blockquote>
          <code>
            Set-Cookie=name1=opaque1
            <br>
            Set-Cookie=name=xxx; Expires=Thursday, 04-May-95 18:45:39 GMT
          </code>
        </blockquote>

        <p>
          add an <a href="http://www.w3c.org/Protocols/">HTTP/1.1</a> header
          at the beginning of the transmission of this document.  If the
          client receiving this header supports cookie caching (currently only
          <a
          href="http://www.netscape.com/download/prodinfonfs_1.html">Netscape
          browsers</a> browsers support this) then it will save the name=value
          pairs and include them in the request headers when documents in the
          same directory or sub-directories are accessed.  The server will put
          the name=value pairs in the CGI environment variable <a
          href="appendixD.html#HTTP_COOKIE"><code>HTTP_COOKIE</code></a> for
          access by <a href="cgi.html">CGI programs</a>.  This is useful for
          "shopping basket" type applications.
        </p>

        <p>
          Normally the client will discard the cookie at the end of a session.
          However, if an <code>Expires</code> parameter like the one above is
          provided the cookie will be saved between sessions and only
          discarded when it expires.
        </p>

        <p>
          More information about the proposed <a
          href="http://www.w3c.org/Protocols/">HTTP/1.1</a>
          <code>Set-Cookie</code> header is available at <a
          href="http://home.netscape.com/newsref/std/cookie_spec.html">http://home.netscape.com/newsref/std/cookie_spec.html</a>.
        </p>
      </dd>

      <dt>
        <a name="fdir.title"><code>Title</code></a> -- Specify the title of a
        document or file.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Title=This is the title
          </code>
        </blockquote>

        <p>
          specifies the text "<code>This is the title</code>" as the title of
          the file.  If the file is an HTML document this is not necessary as
          <a href="index_desc.html#wndex"><code>wndex</code></a> will attempt
          to read the title from the document itself.  If this line is
          supplied anyway it will override the title in the document.  If this
          line is not supplied and the file is not an HTML document the
          default title "<code>File&nbsp;&lt;filename&gt;</code>" is used.
        </p>
      </dd>

      <dt>
        <a name="fdir.wrappers"><code>Wrappers</code></a> -- Specify the files
        to be included in a text document.
      </dt>
      <dd>
        <p>
          The line:
        </p>

        <blockquote>
          <code>
            Wrappers=file1
          </code>
        </blockquote>

        <p>
          causes "<code>file1</code>" to be parsed for lines like
          "<code>&lt;!--&nbsp;#include&nbsp;--&gt;</code>".  When such a
          marker is found the file whose record contains this line is inserted
          and the combined document is sent to the client.  It is possible to
          list multiple files in this directive.  The semantics of this are
          explained in the section of the user guide on <a
          href="parse.html">server-side includes and wrappers</a>.
        </p>

        <p>
          If a listed file name begins with a '<code>/</code>' the name is
          considered as a path relative to the system root directory.  If it
          begins with '<code>~/</code>' as in "<code>~/dir/foo</code>" it is
          assumed to be relative to the <em>WN</em> root directory.  Otherwise
          it is assumed to be a path relative to the directory containing the
          <a href="index_desc.html#index"><code>index</code></a> file.  See
          the section of the user guide on <a href="parse.html">includes and
          wrappers</a> for more information.
        </p>
      </dd>
    </dl>



    <!-- #end -->
    <hr size="4">

    <address>
      <em>WN</em> version 2.0.3
      <br>
      Copyright &copy; 1998 <a href="mailto:john@math.nwu.edu">John Franks
      &lt;john@math.nwu.edu&gt;</a>
      <br>
      licensed under the <a href="http://www.opencontent.org/opl.html">
      OpenContent Public License</a>
      <br>
      last-modified: Fri, 09 Oct 1998 18:18:09 GMT
    </address>

    <!-- pnuts --> <a href="appendixA2.html">[Previous]</a> <a href="appendixC.html">[Next]</a> <a href="manual.html">[Up]</a> <a href="manual.html">[Top]</a> <a href="dosearch.html">[Search]</a> <a href="docindex.html">[Index]</a>
  </body>
</html>