IntroductionIntroduction
  CGI and SSICGI and SSI
  <pike> tag<pike> tag
  Pike scriptPike script
  ModulesModules
  Parser modulesParser modules
  Location modulesLocation modules
  Other module typesOther module types
    <Authentification>Authentification<Authentification>Authentification
    <Directory>Directory<Directory>Directory
    <Extension>Extension<Extension>Extension
    <File extension>File extension<File extension>File extension
    <Filter>Filter<Filter>Filter
    <First>First<First>First
    <Last>Last<Last>Last
    <Log>Log<Log>Log
    <Provider>Provider<Provider>Provider
    <URL>URL<URL>URL
  Request information objectRequest information object
  ResponsesResponses
  Library methodsLibrary methods
 
Extension

An extension module handle a virtual file extension. It will be called before any location modules, in case the use requests an URL ending with that extension.

The module type constant is MODULE_EXTENSION.

The API methods are:

array (string) query_extensions()
returns an array of strings containing the extensions this module handles. It should be configurable by the user, the easiest way would be to use a configuration variable of TYPE_STRING_LIST.

mixed handle_extension( string extension, object id )
is the method that will be called to do the actual work. extension is the extension of the request, id the request information object. For possible return values see the responses chapter.