Mod rewrite and Apache processing phases

From RavenWiki
Revision as of 17:52, 11 May 2006 by jw35 (talk | contribs) (Created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

From the Apache mod_rewrite manual:

 Once a request comes in, and Apache has determined the appropriate server 
 (or virtual server), the rewrite engine starts the URL-to-filename translation, 
 processing the mod_rewrite directives from the  per-server configuration. A few 
 steps later, when the final data directories are found, the per-directory 
 configuration directives of mod_rewrite are triggered in the Fixup phase.

This is relavent to Raven because it means that if you want to create rewrite rules that refer to REMOTE_USER, or any other environment variables created by mod_ucam_webauth, those rewrite rules are must appear inside a <Directory> block or an .htaccess file. If they appear outside this they will be processed before mod_ucam_webauth runs and so before the variables are created.