Modifier [L] not working on RedirectRule

Topics: User Forum
Nov 27, 2009 at 5:01 AM

Hi,

Installed IIRF on win2003/IIS6  server using v2.0.1.1013  from IonicIsapiRewriter-2.0-Release-bin.zip

For some reason the [L] modifier is causing an error when parsed and causing the rule to be ignored

E.g. when i test one of your samples

# check for existence of the cookie, before allowing download
RewriteCond %{HTTP_COOKIE} (?!LicenseAcceptance=.+)   [I]
RedirectRule ^/download/.*  /license.php?doc=$0      [I,L]

Fri Nov 27 15:15:30 - 66760 - WARNING: Invalid modifier flag - L
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: ERROR: line  28: invalid modifiers, Ignoring that rule.

What would cause the [L] modifier to thow an error whe parsed, is it there something wrong with my install?

more complete  log is below

 

Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - Cached: DLL_THREAD_DETACH
Fri Nov 27 15:15:30 - 66760 - IsIniFileUpdated: 'E:\Inetpub\wwwroot\website\Iirf.ini'
Fri Nov 27 15:15:30 - 66760 - IsIniFileUpdated: YES
Fri Nov 27 15:15:30 - 66760 - GetSiteConfig: Obtain  site '/LM/W3SVC/1908742128/Root' , Ini file has been updated.
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: actual log file 'E:\LogFiles\IsonicIsapiReWrite\website\iir.66960.log'
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: ini file: 'E:\Inetpub\wwwroot\website\Iirf.ini'
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: ini file timestamp: 2009/11/27 15:15:22 AUS Eastern Daylight Time
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: pass 1
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: line   7: StatusUrl /iirfStatus
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: line   7: StatusUrl is enabled for local requests only.
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: WARNING: line 9: unrecognized directive, ignoring it: 'NotifyLog'
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: line  27: RewriteCond   %{HTTP_COOKIE}  (?!LicenseAcceptance=.+)
Fri Nov 27 15:15:30 - 66760 - ParseCondModifierFlags: '[I]'
Fri Nov 27 15:15:30 - 66760 - ParseCondModifierFlags: token 'I'
Fri Nov 27 15:15:30 - 66760 - Cond: Case Insensitive match
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: line  28: RedirectRule (rule 1)  '^/download/.*'  '/license.php?doc=$0'    [I,L]
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: not a duplicate rule...
Fri Nov 27 15:15:30 - 66760 - ParseRuleModifierFlags: '[I,L]'
Fri Nov 27 15:15:30 - 66760 - ParseRuleModifierFlags: token 'I'
Fri Nov 27 15:15:30 - 66760 - rule: Case Insensitive match
Fri Nov 27 15:15:30 - 66760 - ParseRuleModifierFlags: token 'L'
Fri Nov 27 15:15:30 - 66760 - rule: Last
Fri Nov 27 15:15:30 - 66760 - WARNING: Invalid modifier flag - L
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: ERROR: line  28: invalid modifiers, Ignoring that rule.
Fri Nov 27 15:15:30 - 66760 - ReadSiteConfig: Done reading, found 0 rules (1 errors, 1 warnings) on 64 lines
Fri Nov 27 15:15:30 - 66760 - ReleaseOrExpireSiteConfig: site '/LM/W3SVC/1908742128/Root' (era=2) (rc=0) (Expired=1) (ptr=0x01D858F0)...
Fri Nov 27 15:15:30 - 66760 - GetSiteConfig: Obtain  site '/LM/W3SVC/1908742128/Root' (era=3) (rc=1) (Expired=0) (ptr=0x01D88728)...
Fri Nov 27 15:15:30 - 66760 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Nov 27 15:15:30 - 66760 - HttpFilterProc: cfg= 0x01D88728
Fri Nov 27 15:15:30 - 66760 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Nov 27 15:15:30 - 66760 - DoRewrites
Fri Nov 27 15:15:30 - 66760 - GetServerVariable_AutoFree: getting 'url'
Fri Nov 27 15:15:30 - 66760 - GetServerVariable_AutoFree: 128 bytes
Fri Nov 27 15:15:30 - 66760 - GetServerVariable_AutoFree: result ''
Fri Nov 27 15:15:30 - 66760 - GetHeader_AutoFree: getting 'url'
Fri Nov 27 15:15:30 - 66760 - GetHeader_AutoFree: 26 bytes   ptr:0x00174CD8
Fri Nov 27 15:15:30 - 66760 - GetHeader_AutoFree: 'url' = '/asdfasdf/asdfasd/123/htm'
Fri Nov 27 15:15:30 - 66760 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Fri Nov 27 15:15:30 - 66760 - GetServerVariable_AutoFree: 1 bytes
Fri Nov 27 15:15:30 - 66760 - GetServerVariable_AutoFree: result ''
Fri Nov 27 15:15:30 - 66760 - GetHeader_AutoFree: getting 'method'
Fri Nov 27 15:15:30 - 66760 - GetHeader_AutoFree: 4 bytes   ptr:0x00141918
Fri Nov 27 15:15:30 - 66760 - GetHeader_AutoFree: 'method' = 'GET'
Fri Nov 27 15:15:30 - 66760 - DoRewrites: New Url, before decoding: '/asdfasdf/asdfasd/123/htm'
Fri Nov 27 15:15:30 - 66760 - DoRewrites: Url (no decoding): '/asdfasdf/asdfasd/123/htm'
Fri Nov 27 15:15:30 - 66760 - EvaluateRules: depth=0
Fri Nov 27 15:15:30 - 66760 - EvaluateRules: No rewrite rules available.
Fri Nov 27 15:15:30 - 66760 - DoRewrites: No Rewrite
Fri Nov 27 15:15:30 - 66760 - HttpFilterProc: SF_NOTIFY_LOG
Fri Nov 27 15:15:30 - 66760 - ReleaseOrExpireSiteConfig: site '/LM/W3SVC/1908742128/Root' (era=3) (rc=0) (Expired=0) (ptr=0x01D88728)...

 

 

Also things something like  RedirectRule ^/(.*)$       http://www.mydomain.com/$1         [L,R=301]  cause a paring error because of the [L], removing the [L] and using  [R=301]  by itself works fine.

regards

 

Guy

Coordinator
Nov 27, 2009 at 2:15 PM

It's an error in the example.  [L] should not be used with [R], it's not meaningful to do so.

if you tell me where you got the same, I'll fix it.