{REQUEST_FILENAME} rule not working

Topics: Developer Forum
Dec 17, 2010 at 2:49 PM

URL- domain.com/support.aspx

problem- this file exists still gets redirected to page not found page (indexi.html), It happens for all the pages which exist but not have any rule written for them in IIRF

in logs- ReplaceServerVariables: in='%{REQUEST_FILENAME}' out='REQUEST_FILENAME'   (why out = REQUEST_FILENAME??  shouldn't it be C:\inetpub\je-test\support.aspx ?? )

My IIRF file-

RewriteCond  %{REQUEST_FILENAME}     !-f
RewriteCond  %{REQUEST_FILENAME}     !-d
RewriteRule ^.*$                    /indexi.htm                      [U,L]

 

Logs-

Fri Dec 17 20:00:26 - 70792 - -------------------------------------------------------
Fri Dec 17 20:00:26 - 70792 - Ionic ISAPI Rewriting Filter (IIRF) 2.0.1.15 RELEASE
Fri Dec 17 20:00:26 - 70792 - IIRF was built on: Dec  3 2009 11:49:15
Fri Dec 17 20:00:26 - 70792 - Cached: DLL_PROCESS_ATTACH
Fri Dec 17 20:00:26 - 70792 - Cached: Process ID: 70444
Fri Dec 17 20:00:26 - 70792 - Cached: DLL_PROCESS_ATTACH - complete
Fri Dec 17 20:00:26 - 70792 - Cached: GetFilterVersion
Fri Dec 17 20:00:26 - 70792 - GetLogFile: app:'/LM/W3SVC/2/ROOT'  new log:'C:\IIRFlog\iirfLog-jeTest.out.70444.log'
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: actual log file 'C:\IIRFlog\iirfLog-jeTest.out.70444.log'
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: ini file: 'C:\inetpub\je-test\Iirf.ini'
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: ini file timestamp: 2010/12/17 19:58:50 (local time)
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: line  41: LogLevel = 5
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: pass 1
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: line   9: IterationLimit 3
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: line  52: MaxMatchCount 10
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: line  60: RewriteCond   %{REQUEST_FILENAME}  !-f
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: line  61: RewriteCond   %{REQUEST_FILENAME}  !-d
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: line  63: RewriteRule (rule 1)  '^.*$'  '/indexi.htm'    [U,L]
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: not a duplicate rule...
Fri Dec 17 20:00:26 - 70792 - ParseRuleModifierFlags: '[U,L]'
Fri Dec 17 20:00:26 - 70792 - ParseRuleModifierFlags: token 'U'
Fri Dec 17 20:00:26 - 70792 - rule: Unmangle URLs
Fri Dec 17 20:00:26 - 70792 - ParseRuleModifierFlags: token 'L'
Fri Dec 17 20:00:26 - 70792 - rule: Last
Fri Dec 17 20:00:26 - 70792 - ReadSiteConfig: Done reading, found 1 rules (0 errors, 0 warnings) on 68 lines
Fri Dec 17 20:00:26 - 70792 - GetSiteConfig: Obtain  site '/LM/W3SVC/2/ROOT' (era=0) (rc=1) (Expired=0) (ptr=0x01D00A58)...
Fri Dec 17 20:00:26 - 70792 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Dec 17 20:00:26 - 70792 - DoRewrites
Fri Dec 17 20:00:26 - 70792 - GetServerVariable_AutoFree: getting 'url'
Fri Dec 17 20:00:26 - 70792 - GetServerVariable_AutoFree: 128 bytes
Fri Dec 17 20:00:26 - 70792 - GetServerVariable_AutoFree: result ''
Fri Dec 17 20:00:26 - 70792 - GetHeader_AutoFree: getting 'url'
Fri Dec 17 20:00:26 - 70792 - GetHeader_AutoFree: 23 bytes   ptr:0x006A0340
Fri Dec 17 20:00:26 - 70792 - GetHeader_AutoFree: 'url' = '/support.aspx'
Fri Dec 17 20:00:26 - 70792 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Fri Dec 17 20:00:26 - 70792 - GetServerVariable_AutoFree: 1 bytes
Fri Dec 17 20:00:26 - 70792 - GetServerVariable_AutoFree: result ''
Fri Dec 17 20:00:26 - 70792 - GetHeader_AutoFree: getting 'method'
Fri Dec 17 20:00:26 - 70792 - GetHeader_AutoFree: 4 bytes   ptr:0x006A02B8
Fri Dec 17 20:00:26 - 70792 - GetHeader_AutoFree: 'method' = 'GET'
Fri Dec 17 20:00:26 - 70792 - DoRewrites: New Url, before decoding: '/support.aspx'
Fri Dec 17 20:00:26 - 70792 - DoRewrites: Url (no decoding): '/support.aspx'
Fri Dec 17 20:00:26 - 70792 - EvaluateRules: depth=0
Fri Dec 17 20:00:26 - 70792 - EvaluateRules: Rule 1 : 1 matches
Fri Dec 17 20:00:26 - 70792 - GetServerVariable: getting 'REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - GetServerVariable: special variable name
Fri Dec 17 20:00:26 - 70792 - GetServerVariable: 16 bytes
Fri Dec 17 20:00:26 - 70792 - GetServerVariable: result 'REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - ReplaceServerVariables: VariableName='REQUEST_FILENAME' Value='REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - ReplaceServerVariables: in='%{REQUEST_FILENAME}' out='REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - EvalCondition: ts1 'REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - GenerateReplacementString: result 'REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - EvalCondition: checking 'REQUEST_FILENAME' against pattern '!-f'
Fri Dec 17 20:00:26 - 70792 - EvalCondition: cond->SpecialConditionType= 'f'
Fri Dec 17 20:00:26 - 70792 - EvalCondition: Special: it is not a file
Fri Dec 17 20:00:26 - 70792 - EvalCondition: Special, retVal= false
Fri Dec 17 20:00:26 - 70792 - EvalCondition: Cond %{REQUEST_FILENAME} !-f => TRUE
Fri Dec 17 20:00:26 - 70792 - EvalCondition: Child is non NULL (parent= 0x01D07128) (child= 0x01D07168)
Fri Dec 17 20:00:26 - 70792 - EvalCondition: Current condition evaluates to TRUE
Fri Dec 17 20:00:26 - 70792 - EvalCondition: Logical AND, ergo we evaluate the Child
Fri Dec 17 20:00:26 - 70792 - GetServerVariable: getting 'REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - GetServerVariable: special variable name
Fri Dec 17 20:00:26 - 70792 - GetServerVariable: 16 bytes
Fri Dec 17 20:00:26 - 70792 - GetServerVariable: result 'REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - ReplaceServerVariables: VariableName='REQUEST_FILENAME' Value='REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - ReplaceServerVariables: in='%{REQUEST_FILENAME}' out='REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - EvalCondition: ts1 'REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - GenerateReplacementString: result 'REQUEST_FILENAME'
Fri Dec 17 20:00:26 - 70792 - EvalCondition: checking 'REQUEST_FILENAME' against pattern '!-d'
Fri Dec 17 20:00:26 - 70792 - EvalCondition: cond->SpecialConditionType= 'd'
Fri Dec 17 20:00:26 - 70792 - EvalCondition: Special: it is not a directory
Fri Dec 17 20:00:26 - 70792 - EvalCondition: Special, retVal= false
Fri Dec 17 20:00:26 - 70792 - EvalCondition: Cond %{REQUEST_FILENAME} !-d => TRUE
Fri Dec 17 20:00:26 - 70792 - EvalConditionList: rule 1, TRUE, Rule will apply
Fri Dec 17 20:00:26 - 70792 - ReplaceServerVariables: in='/indexi.htm' out='/indexi.htm'
Fri Dec 17 20:00:26 - 70792 - GenerateReplacementString: result '/indexi.htm'
Fri Dec 17 20:00:26 - 70792 - EvaluateRules: Result (length 11): /indexi.htm
Fri Dec 17 20:00:26 - 70792 - EvaluateRules: Last Rule
Fri Dec 17 20:00:26 - 70792 - EvaluateRules: returning 1
Fri Dec 17 20:00:26 - 70792 - DoRewrites: Rewrite Url to: '/indexi.htm'


 and it rewrites to indexi.htm

Coordinator
Dec 17, 2010 at 6:24 PM

Try PATH_TRANSLATED or SCRIPT_NAME., instead of REQUEST_FILENAME.

 

Dec 18, 2010 at 11:36 AM

Thanks Cheeso , PATH_TRANSLATED worked

but what was the problem?