Forcing iirf to always include the HTTP_X_REWRITE_URL header

Nov 15, 2011 at 12:49 AM

If there is nothing to rewrite this header is not included.  Is there anyway via ini, or whatever to have it mimic .htaccess rewriting and be set to `/` when no rewriting has taken place?

Nov 15, 2011 at 3:28 PM

one way is to include a rule that rewrites a URL to itself. Something like this;

# Rewrite any URL to "itself".  ($0 matches all of the incoming 
# URL path.) This rule is decorated with the L modifier to indicate
# :Last rule:, which means rule processing will not iterate further
# after this rule fires. No endless loops.  Also, it gets the U modifer
# which says to set the HTTP_X_REWRITE_URL variable with
# the original. This rule should always appear LAST in the 
# IIRf.ini file, so as not to pre-empt any other rules.
RewriteRule ^/.*    $0  [U,L]