RewriteMap not working (eurl.axd appearing in URL)

Mar 2, 2011 at 8:25 PM

Other redirections work but can't get RedirectMap to work.  Here's the iirf.ini:

RewriteMap  vmap   txt:D:\iirf\vmap.txt
RewriteCond  ${vmap:$1|NOTFOUND}  !^NOTFOUND$
RedirectRule ^/(.*) ${vmap:$1} [NC,R=301]

Content of D:\iirf\vmap.txt is:

what http://google.ca

Expecting http://mysite/what to be redirected to http://google but no.  Got a 404 not found on http://mysite/what.

A straight redirect works though: RedirectRule ^/what http://google.ca [R=301]

The log reads like this:

Wed Mar 02 12:22:49 - 2560 - -------------------------------------------------------
Wed Mar 02 12:22:49 - 2560 - Ionic ISAPI Rewriting Filter (IIRF) 2.1.1.25 x86 RELEASE
Wed Mar 02 12:22:49 - 2560 - IIRF was built on: Jan 7 2011 07:30:24
Wed Mar 02 12:22:49 - 2560 - Cached: DLL_PROCESS_ATTACH
Wed Mar 02 12:22:49 - 2560 - Cached: Process ID: 2720
Wed Mar 02 12:22:49 - 2560 - Cached: ReadServerConfig: Could not open ini file 'D:\IIRF\IirfGlobal.ini' (error: 2)
Wed Mar 02 12:22:49 - 2560 - Cached: DLL_PROCESS_ATTACH - complete
Wed Mar 02 12:22:49 - 2560 - Cached: GetFilterVersion
Wed Mar 02 12:22:49 - 2560 - GetLogFile: app:'/LM/W3SVC/3/Root' new log:'D:\IIRF\IIRF.2720.log'
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: actual log file 'D:\IIRF\IIRF.2720.log'
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: ini file: 'D:\Intranet2\Iirf.ini'
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: ini file timestamp: 2011/03/02 12:21:35 Pacific Standard Time
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: cfg(0x01495B90)
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: LogLevel = 5
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: pass 2
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: D:\Intranet2\Iirf.ini(5): RewriteEngine will be enabled.
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: D:\Intranet2\Iirf.ini(6): StatusInquiry ON (--) (--)
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: D:\Intranet2\Iirf.ini(6): IIRF Status Inquiry is enabled at path '/iirfStatus' for local requests only.
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: D:\Intranet2\Iirf.ini(7): IterationLimit 5
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: D:\Intranet2\Iirf.ini(14): RewriteMap vmap txt:D:\iirf\vmap.txt
Wed Mar 02 12:22:49 - 2560 - ReadTextMap: D:\iirf\vmap.txt(1): key(what) value(http://google.ca)
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: D:\Intranet2\Iirf.ini(15): RewriteCond ${vmap:$1|NOTFOUND} !^NOTFOUND$ '(null)'
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: D:\Intranet2\Iirf.ini(16): RedirectRule (rule 1) '^/(.*)' '${vmap:$1}' [NC,R=301]
Wed Mar 02 12:22:49 - 2560 - ParseRuleModifierFlags: '[NC,R=301]'
Wed Mar 02 12:22:49 - 2560 - ParseRuleModifierFlags: token 'NC'
Wed Mar 02 12:22:49 - 2560 - rule: Case Insensitive match
Wed Mar 02 12:22:49 - 2560 - ParseRuleModifierFlags: token 'R=301'
Wed Mar 02 12:22:49 - 2560 - rule: Redirect(301)
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: D:\Intranet2\Iirf.ini(16): INFO: Redirecting to a target that does not include an http(s):// scheme.
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: The rule will Redirect to a target on the local machine
Wed Mar 02 12:22:49 - 2560 - ReadVdirConfig: Done reading INI for the root vdir, found 1 rules (0 errors, 0 warnings) on 24 lines
Wed Mar 02 12:22:49 - 2560 - GetVdirConfig: Obtain vdir '/LM/W3SVC/3/Root' (era=0) (rc=1) (Expired=0) (ptr=0x01495B90)...
Wed Mar 02 12:22:49 - 2560 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Mar 02 12:22:49 - 2560 - HttpFilterProc: cfg= 0x01495B90
Wed Mar 02 12:22:49 - 2560 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Wed Mar 02 12:22:49 - 2560 - DoRewrites
Wed Mar 02 12:22:49 - 2560 - GetHeader_AutoFree: getting 'url'
Wed Mar 02 12:22:49 - 2560 - GetHeader_AutoFree: 48 bytes ptr:0x000D1F00
Wed Mar 02 12:22:49 - 2560 - GetHeader_AutoFree: 'url' = '/what/eurl.axd/0de502a50c874c4caa079899b2922394'
Wed Mar 02 12:22:49 - 2560 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Wed Mar 02 12:22:49 - 2560 - GetServerVariable_AutoFree: 1 bytes
Wed Mar 02 12:22:49 - 2560 - GetServerVariable_AutoFree: result ''
Wed Mar 02 12:22:49 - 2560 - GetHeader_AutoFree: getting 'method'
Wed Mar 02 12:22:49 - 2560 - GetHeader_AutoFree: 4 bytes ptr:0x000D29E0
Wed Mar 02 12:22:49 - 2560 - GetHeader_AutoFree: 'method' = 'GET'
Wed Mar 02 12:22:49 - 2560 - DoRewrites: New Url, before decoding: '/what/eurl.axd/0de502a50c874c4caa079899b2922394'
Wed Mar 02 12:22:49 - 2560 - DoRewrites: Url (no decoding): '/what/eurl.axd/0de502a50c874c4caa079899b2922394'
Wed Mar 02 12:22:49 - 2560 - EvaluateRules: depth=0
Wed Mar 02 12:22:49 - 2560 - GetServerVariable: getting 'SCRIPT_NAME'
Wed Mar 02 12:22:49 - 2560 - GetServerVariable: 15 bytes
Wed Mar 02 12:22:49 - 2560 - GetServerVariable: result '/what/eurl.axd'
Wed Mar 02 12:22:49 - 2560 - EvaluateRules: no RewriteBase
Wed Mar 02 12:22:49 - 2560 - EvaluateRules: Rule 1: pattern: ^/(.*) subject: /what/eurl.axd/0de502a50c874c4caa079899b2922394
Wed Mar 02 12:22:49 - 2560 - EvaluateRules: Rule 1: 2 match
Wed Mar 02 12:22:49 - 2560 - EvaluateRules: Rule 1: evaluating condition
Wed Mar 02 12:22:49 - 2560 - EvalCondition: cond 0x0149A410
Wed Mar 02 12:22:49 - 2560 - ReplaceServerVariables: alloc 20 bytes
Wed Mar 02 12:22:49 - 2560 - ReplaceServerVariables: in='${vmap:$1|NOTFOUND}' out='${vmap:$1|NOTFOUND}'
Wed Mar 02 12:22:49 - 2560 - EvalCondition: ts1 '${vmap:$1|NOTFOUND}'
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: map?
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: alloc 48 bytes
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: result 'what/eurl.axd/0de502a50c874c4caa079899b2922394'
Wed Mar 02 12:22:49 - 2560 - MapKey: map(vmap) key(what/eurl.axd/0de502a50c874c4caa079899b2922394)
Wed Mar 02 12:22:49 - 2560 - MapKey: map(vmap) key(what/eurl.axd/0de502a50c874c4caa079899b2922394) no value found
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: alloc 10 bytes
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: result 'NOTFOUND'
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: alloc 10 bytes
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: map?
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: alloc 48 bytes
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: result 'what/eurl.axd/0de502a50c874c4caa079899b2922394'
Wed Mar 02 12:22:49 - 2560 - MapKey: map(vmap) key(what/eurl.axd/0de502a50c874c4caa079899b2922394)
Wed Mar 02 12:22:49 - 2560 - MapKey: map(vmap) key(what/eurl.axd/0de502a50c874c4caa079899b2922394) no value found
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: alloc 10 bytes
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: result 'NOTFOUND'
Wed Mar 02 12:22:49 - 2560 - GenerateReplacementString: result 'NOTFOUND'
Wed Mar 02 12:22:49 - 2560 - EvalCondition: t(NOTFOUND) op(~) p(!^NOTFOUND$)
Wed Mar 02 12:22:49 - 2560 - EvalCondition: match result: 1 (match)
Wed Mar 02 12:22:49 - 2560 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Wed Mar 02 12:22:49 - 2560 - EvalConditionList: rule 1, FALSE, Rule does not apply
Wed Mar 02 12:22:49 - 2560 - EvaluateRules: returning 0
Wed Mar 02 12:22:49 - 2560 - DoRewrites: No Rewrite
Wed Mar 02 12:22:49 - 2560 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Mar 02 12:22:49 - 2560 - HttpFilterProc: cfg= 0x01495B90
Wed Mar 02 12:22:50 - 8172 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Mar 02 12:22:50 - 8172 - HttpFilterProc: cfg= 0x01495B90
Wed Mar 02 12:22:57 - 8172 - HttpFilterProc: SF_NOTIFY_LOG
Wed Mar 02 12:22:57 - 8172 - ReleaseOrExpireVdirConfig: vdir '/LM/W3SVC/3/Root' (era=0) (rc=0) (Expired=0) (ptr=0x01495B90)...

Hope you can shed some lights...

thanks,

dennis

Coordinator
Mar 8, 2011 at 1:33 PM

yes -

you have ASPNET V4 installed, and this is injecting a eurl.axd (and some other stuff) into your URLs.  What IIRF sees is not "/what" but "/what/eurl.axd/8273827429837".  And there is no entry in your map file for that value, I suppose.

To understand the issue, you can view http://iirf.codeplex.com/workitem/27713 . or better, see the appropriate page in your documentation file  (IIrfGuide.chm) . It's here:

 

Mar 9, 2011 at 3:59 PM

Great.  I have added the registry key as suggested and the RewriteMap is now working.

I've always assume http://cheeso.members.winisp.net/Iirf21Help/frames.htm is the same thing so I didn't realize there a section specifically for ,net4.  May be it's a good idea to append this section to the online doc, too.

One last note, the [NC] flag doesn't seem to be working in my case.  RedirectRule ^/(.*) ${vmap:$1} [NC,R=301] remains case sensitive.  Any way to correct that?

Thanks!

Coordinator
Mar 9, 2011 at 4:44 PM

YEs, thanks for the suggestions. The online doc is somewhat out of date.  I will work on getting it updated with the next minor release of IIRF.

Regarding [NC], what do you expect it to do?  It applies to the regex that is used on the URL.  I think you want to do a case-insensitive lookup in the map.  If that's the case, the best you can do is case folding of the key.  For example surround the $1 with #L and #E , eg

RedirectRule ^/(.*) ${vmap:#L$1#E} [R=301]

To get this to work, you must insure all keys in the map file are lowercase.

This is covered in the online doc, see here.

Mar 9, 2011 at 6:12 PM

Worked but  I had to comment out this line to get it to work.  

RewriteCond  ${vmap:$1|NOTFOUND}  !^NOTFOUND$

which introduced other problems.  Anyway to get around this?

Coordinator
Mar 9, 2011 at 11:01 PM

I don't know.  What "other problems" did it introduce?

 

Mar 10, 2011 at 4:33 PM

Like my main site (http://mysite/default.aspx) and other pages (http://mysite/otherpages) that are not found in the map would stop working without that line.

Coordinator
Mar 10, 2011 at 10:58 PM
Edited Mar 10, 2011 at 11:02 PM

Ok, I see.  You need the RewriteCond line, in order to get your main site and a few other pages to work.  But, for some reason, using the RewriteCond line prevents the *other* URLs from working.

To help figure this out, I'd need to see the IIRF log from one of the "not working" URLs.   You should include the RewriteCond in the ini file for this test.

Mar 10, 2011 at 11:05 PM

yes.  so my situation is:

with the RewriteCond line - all pages under mysite work; pages found in the redirect map work but remain case sensitive even with case folding implemented

without the RewriteCond line - pages found in the redirect map work and are case insensitive, but pages not found in the redirect map don't work

Coordinator
Mar 10, 2011 at 11:12 PM

ok, then I once again do not understand.  What does it mean "remain case sensitive".  Can you show me an iirf.log from a URL that does not work.  Include the RewriteCond .

 

Mar 11, 2011 at 3:06 PM
Edited Mar 11, 2011 at 3:10 PM

k - sorry for not being too clear. Here is my iirf.ini

RewriteLogLevel 3
RewriteLog D:\IIRF\IIRF
RewriteEngine ON
StatusInquiry ON
IterationLimit 5
RewriteMap vmap txt:D:\iirf\vmap.txt
RewriteCond ${vmap:$1|NOTFOUND} !^NOTFOUND$
RewriteRule ^/(.*) ${vmap:#L$1#E} [R=301]

Here's the content of D:\IIRF\vmap.txt:

about-parks-canada/aboriginal.aspx?lang=en http://intranet-qa/content/aborig-autoch/index_e.asp
about-parks-canada/aboriginal.aspx?lang=fr http://intranet-qa/content/aborig-autoch/index_f.asp

I entered this url in the browser:

http://mysite/about-parks-canada/Aboriginal.aspx?lang=en (**Note the capital A in Aboriginal)

No redirection happened.  Here's the log

Fri Mar 11 06:55:25 - 7044 - DoRewrites
Fri Mar 11 06:55:25 - 7044 - DoRewrites: Url (no decoding): '/about-parks-canada/Aboriginal.aspx?lang=en'
Fri Mar 11 06:55:25 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:25 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:25 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:25 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:25 - 7044 - MapKey: map(vmap) key(about-parks-canada/Aboriginal.aspx?lang=en) no value found
Fri Mar 11 06:55:25 - 7044 - MapKey: map(vmap) key(about-parks-canada/Aboriginal.aspx?lang=en) no value found
Fri Mar 11 06:55:25 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:25 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:25 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:25 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:25 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:25 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:25 - 4200 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:25 - 4200 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:26 - 4200 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/css/intranet.css'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(css/intranet.css) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(css/intranet.css) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/css/printpage.css'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(css/printpage.css) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(css/printpage.css) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/css/XSLTsearch.css'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(css/XSLTsearch.css) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(css/XSLTsearch.css) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/scripts/TodaysDate.js'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(scripts/TodaysDate.js) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(scripts/TodaysDate.js) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/scripts/jquery.cycle.min.js'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(scripts/jquery.cycle.min.js) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(scripts/jquery.cycle.min.js) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/scripts/whatsnew.js'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(scripts/whatsnew.js) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(scripts/whatsnew.js) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/media/206/beaver_e.gif'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/206/beaver_e.gif) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/206/beaver_e.gif) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/media/126/beaver_e_02.gif'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/126/beaver_e_02.gif) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/126/beaver_e_02.gif) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/media/277/end_of_bar_lower.gif'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/277/end_of_bar_lower.gif) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/277/end_of_bar_lower.gif) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/media/446/whatnew_header_e.gif'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/446/whatnew_header_e.gif) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/446/whatnew_header_e.gif) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/media/3523/whatnew_bott.gif'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/3523/whatnew_bott.gif) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/3523/whatnew_bott.gif) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/media/451/pc411-1.gif'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/451/pc411-1.gif) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/451/pc411-1.gif) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: cfg= 0x0149A5B0
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Mar 11 06:55:27 - 7044 - DoRewrites
Fri Mar 11 06:55:27 - 7044 - DoRewrites: Url (no decoding): '/media/433/nav_bottom.gif'
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: depth=0
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: no RewriteBase
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: 2 match
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: Rule 1: evaluating condition
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/433/nav_bottom.gif) no value found
Fri Mar 11 06:55:27 - 7044 - MapKey: map(vmap) key(media/433/nav_bottom.gif) no value found
Fri Mar 11 06:55:27 - 7044 - EvalCondition: Cond t(${vmap:$1|NOTFOUND}) op(~) p(!^NOTFOUND$) => FALSE
Fri Mar 11 06:55:27 - 7044 - EvalConditionList: rule 1, FALSE, Rule does not apply
Fri Mar 11 06:55:27 - 7044 - EvaluateRules: returning 0
Fri Mar 11 06:55:27 - 7044 - DoRewrites: No Rewrite
Fri Mar 11 06:55:27 - 7044 - HttpFilterProc: SF_NOTIFY_LOG

Coordinator
Mar 11, 2011 at 5:39 PM

Ah, ok, well, this is pretty simple.

The case-folding needs to be done each time a map lookup is performed. in a previous message I wrote:

the best you can do is case folding of the key.  For example surround the $1 with #L and #E , eg

RedirectRule ^/(.*) ${vmap:#L$1#E} [R=301]

This advice also needs to be applied to the RewriteCond.  You must use:

RewriteCond  ${vmap:#L$1#E|NOTFOUND}  !^NOTFOUND$

....for the condition.  When you use

RewriteCond  ${vmap:$1|NOTFOUND}  !^NOTFOUND$

...IIRF does the lookup on the $1 capture, which is not case folded.  The non-case-folded capture (with the capital A) is not present in the map file, hence NOTFOUND is returned, and so the rule is not applied.

 

 

 

Mar 14, 2011 at 7:26 PM

That worked!

Thanks again for the great product and wonderful support.

Sep 5, 2011 at 8:55 AM

No registry, no extra website.

In IIS6 with ASPNET V4 installed.

 

domain.zzz to www.domain.zzz

catch eurl.axd

RewriteCond %{HTTP_HOST} ^(?!www)[^\.]+\.[^\.]+$ [I]
RedirectRule ^/(.*)(eurl.axd/.*)$ http://www.%{HTTP_HOST}/$1 [R=301]

Catch the rest

RewriteCond %{HTTP_HOST} ^(?!www)[^\.]+\.[^\.]+$ [I]

RedirectRule ^/(.*) http://www.%{HTTP_HOST}/$1 [R=301]

 

//Mattias