We came across an odd mod_rewrite behavior today that is worth documenting. Some of the code uses the environment variables SCRIPT_URI and SCRIPT_URL, which are supposed to be registerd by mod_rewrite. However, if you use the "RewriteEngine on" directive in .htaccess to enable rewrites but don't have a similar line in your apache configuration or vhost configuration block, rewrites will work but those variables will not be set.