[NANOWEB DOCUMENTATION]

NANOWEB, the aEGiS PHP web server

mod_multiviews

The HTTP/1.1 specifies some methods to deliver different variants of files based upon headers the client identifies its or its users preferences / capabilities. This is called content-negotiation and can be accomplished even if the files on the server are "static".

This module uses a very simple (and may be stupid) counting algorithm to select the "best" match for a browser request.


LanguagePriority directive

Syntax: LanguagePriority = en fr de
Context: Server Config
Status: mod_multiviews

A browser requesting http://example.com/ will be delivered 'index.html.en' in favour of 'index.html.de' (if the users browser has not been configured to request with another language preference)

Of course this only works if no 'index.html' exists in the docroot, which nanoweb otherwise would have preselected. A file called 'index.html.fr.gz' may get send in favour of all other variants, because of the higher priority of compressed content.



OtherPriority directive

Syntax: OtherPriority = php; qs=0.28, text/html; qs=0.27, text/*
Context: Server Config
Status: mod_multiviews

Is a new directive which sets priorities which come into use, when the client doesn't send an Accept: header As you can see, you may intermix file extensions (as "php" - without dot!) and mime-types known to nanoweb;
where you don't specify a priority value with qs= (0.0 - 1.0) a lesser (divided by 1.7) value as the previous one will be chosen.

Some micro-priorities (PNGs in favour of GIFs) are built-in but can be overridden this way.

Multiple OtherPriority-lines may be given in the config.



Negotiation directive

Syntax: Negotiation = server | agent
Context: Server Config
Status: mod_multiviews

Selects if the "best" variant is chosen by the server (which is the default), or shall be selected by the client/user (none of the common browser supports this, so an error/selection page will be generated).



ReflectRewriting directive

Syntax: ReflectRewriting = 1
Context: Server Config
Status: mod_multiviews

If this directive isn't set, the requested URI will show up in any error message that may occur, if set to 1 the rewritten filename will be shown instead.
Note: This directive also affects mod_rewrite.



NANOWEB, the aEGiS PHP web server

Index