Red Hat DIRECTORY SERVER 2.0 - GATEWAY Instrukcja Użytkownika Strona 35

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 96
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 34
Chapter 6. Handling directories
Directory URLs
Some URLs (typically those that end in /) correspond to directories rather than plain
files. We need to determine how to deal with these.
dir_module
The dir_module module provides the facility of using a default file (typically called
index.html) in a directory on behalf of the directory itself.
autoindex_module
The autoindex_module module provides the facility of generating a listing of the files
and subdirectories within a directory.
Combining approaches
We will also consider how to combine the two approaches so that an index.html file
is used if present and a directory listing is used if not.
A document has a MIME content type. We’ve already seen that the URLs that cor-
respond to files can now be served with the correct MIME type, so long as the file’s
name has the appropriate suffix. But what about directories? In particular a “top
level” URL such as http://cheese.dept.cam.ac.uk/ will trigger a request for /.
There’s no such file so the server can’t serve it yet, let alone determine a MIME con-
tent type for it.
Figure 6-1. / causing problems
31
Przeglądanie stron 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 95 96

Komentarze do niniejszej Instrukcji

Brak uwag