- publishing free software manuals
The Apache HTTP Server Reference Manual
by Apache Software Foundation
Paperback (6"x9"), 862 pages
ISBN 9781906966034
RRP £19.95 ($29.95)

Get a printed copy>>>

15.6  Note on hyperlinks and naming conventions

If you are using language negotiation you can choose between different naming conventions, because files can have more than one extension, and the order of the extensions is normally irrelevant (see the mod_mime (p. 684) documentation for details).

A typical file has a MIME-type extension (e.g., html), maybe an encoding extension (e.g., gz), and of course a language extension (e.g., en) when we have different language variants of this file.

Examples:

Here are some more examples of filenames together with valid and invalid hyperlinks:




Filename Valid hyperlink Invalid hyperlink



foo.html.en
foo
foo.html
-
foo.en.html foo foo.html
foo.html.en.gz
foo
foo.html
foo.gz
foo.html.gz
foo.en.html.gz foo
foo.html
foo.html.gz
foo.gz
foo.gz.html.en
foo
foo.gz
foo.gz.html
foo.html
foo.html.gz.en
foo
foo.html
foo.html.gz
foo.gz



Looking at the table above, you will notice that it is always possible to use the name without any extensions in a hyperlink (e.g., foo). The advantage is that you can hide the actual type of a document and can change it later, e.g., from html to shtml or cgi without changing any hyperlink references.

If you want to continue to use a MIME-type in your hyperlinks (e.g. foo.html) the language extension (including an encoding extension if there is one) must be on the right hand side of the MIME-type extension (e.g., foo.html.en).

ISBN 9781906966034The Apache HTTP Server Reference ManualSee the print edition