From af893df5fa407fd7c85fa4e727f7ff22356fd806 Mon Sep 17 00:00:00 2001
From: Eric Covener apache2.DECLINED
, or else an HTTP status code.
--- example hook +-- example hook that rewrites the URI to a filesystem path. + +require 'apache2' + +function translate_name(r) + if r.uri == "/translate-name" then + r.filename = r.document_root .. "/find_me.txt" + return apache2.OK + end + -- we don't care about this URL, give another module a chance + return apache2.DECLINED +end +
+--[[ example hook that rewrites one URI to another URI. It returns a + apache2.DECLINED to give other URL mappers a chance to work on the + substitution, including the core translate_name hook which maps based + on the DocumentRoot. + + Note: It is currently undefined as to whether this runs before or after + mod_alias or any other module implementing the same hook. +--]] require 'apache2' -- 2.50.0