error on iirflog file

Topics: Developer Forum, Project Management Forum, User Forum
Jun 16, 2010 at 4:36 AM

Hi,

I have successfully installed and able to verify the status using the statusurl.  Here my request is like  i need to filter a specific site and need to redirect  to a user defined page or static page.  So once after the creation I have deployed below entries in

IirfGlobal.ini


RewriteEngine ON
RewriteLogLevel 3
RewriteLog c:\temp-global\iirf
RewriteFilterPriority HIGH
StatusUrl /iirfStatus

And in iirf.ini file which in root location

RewriteLogLevel 3
RewriteLog c:\temp\iirf
StatusUrl /iirfStatus
# ------
# Any incoming URL request that specifies /test/test.html
# will be redirected to /test/abc.html
RewriteRule  ^/test/test.html http://localhost/test/abc.html

 

But this one is not working for me. In error logs am getting message as

 

Tue Jun 15 23:10:10 -  3692 - -------------------------------------------------------
Tue Jun 15 23:10:10 -  3692 - Ionic ISAPI Rewriting Filter (IIRF) 2.0.1.15 RELEASE
Tue Jun 15 23:10:10 -  3692 - IIRF was built on: Dec  3 2009 11:49:15
Tue Jun 15 23:10:10 -  3692 - Cached: DLL_PROCESS_ATTACH
Tue Jun 15 23:10:10 -  3692 - Cached: Process ID: 4004
Tue Jun 15 23:10:10 -  3692 - Cached: ReadServerConfig: NotifyLog setting is now: ON
Tue Jun 15 23:10:10 -  3692 - Cached: ReadServerConfig: WARNING: line 3: unrecognized directive, ignoring it: 'RewriteLogLevel'
Tue Jun 15 23:10:10 -  3692 - Cached: ReadServerConfig: WARNING: line 4: unrecognized directive, ignoring it: 'RewriteLog'
Tue Jun 15 23:10:10 -  3692 - Cached: ReadServerConfig: Filter Priority is now: HIGH (0x80000)
Tue Jun 15 23:10:10 -  3692 - Cached: ReadServerConfig: WARNING: line 6: unrecognized directive, ignoring it: 'StatusUrl'
Tue Jun 15 23:10:10 -  3692 - Cached: ReadServerConfig: WARNING: line 8: unrecognized directive, ignoring it: 'RewriteRule'
Tue Jun 15 23:10:10 -  3692 - Cached: DLL_PROCESS_ATTACH - complete
Tue Jun 15 23:10:10 -  3692 - Cached: GetFilterVersion
Tue Jun 15 23:10:10 -  3692 - GetLogFile: app:'/LM/W3SVC/1/ROOT'  new log:'c:\temp\iirf.4004.log'
Tue Jun 15 23:10:10 -  3692 - ReadSiteConfig: actual log file 'c:\temp\iirf.4004.log'
Tue Jun 15 23:10:10 -  3692 - ReadSiteConfig: ini file: 'c:\inetpub\wwwroot\Iirf.ini'
Tue Jun 15 23:10:10 -  3692 - ReadSiteConfig: ini file timestamp: 2010/06/15 23:07:29 Central Daylight Time
Tue Jun 15 23:10:10 -  3692 - ReadSiteConfig: line   3: StatusUrl /iirfStatus
Tue Jun 15 23:10:10 -  3692 - ReadSiteConfig: line   3: StatusUrl is enabled for local requests only.
Tue Jun 15 23:10:10 -  3692 - ReadSiteConfig: line   7: RewriteRule (rule 1)  '^/test'  'http://localhost/test/test1.html'   (null)
Tue Jun 15 23:10:10 -  3692 - ReadSiteConfig: WARNING: line $d: Rewriting to a fully-qualified URL. Do you want RedirectRule or ProxyRule?
Tue Jun 15 23:10:10 -  3692 - ReadSiteConfig: Done reading, found 1 rules (0 errors, 1 warnings) on 8 lines
Tue Jun 15 23:10:10 -  3692 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jun 15 23:10:10 -  3692 - HttpFilterProc: cfg= 0x018F4B90
Tue Jun 15 23:10:10 -  3692 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Jun 15 23:10:10 -  3692 - DoRewrites
Tue Jun 15 23:10:10 -  3692 - DoRewrites: Url (no decoding): '/iirfstatus'
Tue Jun 15 23:10:10 -  3692 - EvaluateRules: depth=0
Tue Jun 15 23:10:10 -  3692 - HttpFilterProc: SF_NOTIFY_LOG
Tue Jun 15 23:25:46 -  5640 - ReadSiteConfig: actual log file 'c:\temp\iirf.4004.log'
Tue Jun 15 23:25:46 -  5640 - ReadSiteConfig: ini file: 'c:\inetpub\wwwroot\Iirf.ini'
Tue Jun 15 23:25:46 -  5640 - ReadSiteConfig: ini file timestamp: 2010/06/15 23:13:10 Central Daylight Time
Tue Jun 15 23:25:46 -  5640 - ReadSiteConfig: line   3: StatusUrl /iirfStatus
Tue Jun 15 23:25:46 -  5640 - ReadSiteConfig: line   3: StatusUrl is enabled for local requests only.
Tue Jun 15 23:25:46 -  5640 - ReadSiteConfig: line   7: RewriteRule (rule 1)  '^/test/test.html'  'http://localhost/test/test1.html'   (null)
Tue Jun 15 23:25:46 -  5640 - ReadSiteConfig: WARNING: line $d: Rewriting to a fully-qualified URL. Do you want RedirectRule or ProxyRule?
Tue Jun 15 23:25:46 -  5640 - ReadSiteConfig: Done reading, found 1 rules (0 errors, 1 warnings) on 8 lines
Tue Jun 15 23:25:46 -  5640 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jun 15 23:25:46 -  5640 - HttpFilterProc: cfg= 0x018F7F90
Tue Jun 15 23:25:46 -  5640 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Jun 15 23:25:46 -  5640 - DoRewrites
Tue Jun 15 23:25:46 -  5640 - DoRewrites: Url (no decoding): '/iirfstatus'
Tue Jun 15 23:25:46 -  5640 - EvaluateRules: depth=0
Tue Jun 15 23:25:46 -  5640 - HttpFilterProc: SF_NOTIFY_LOG

 

I belive the way I gave the rewrite instruction is wrong, please help me here.

Thanks,

kiran

 

 

Jun 16, 2010 at 12:18 PM

hi I have cleared some issue from my end, there was permission issue for "IUSE_hostname", now its given to all 3 files. The IirfGlobal.ini file modified with

 

RewriteEngine ON
RewriteFilterPriority HIGH

And the iirf.ini file with

RewriteLogLevel 3
RewriteLog c:\temp\iirf
StatusUrl /iirfStatus
RewriteRule  ^/test  /test/test1.html
RewriteRule  ^/test/(.*).html http://localhost/test/test1.html

What here am trying is  the request page "http://localhost/test/test.html"  comes, it need to redirect to "http://localhost/test/test.html". That mean same virtual directory instead of "test.html",  need to load "test1.html".

I believe am wrong in the regular expression.

This is the latest log am having:

Wed Jun 16 07:07:19 -  4180 - -------------------------------------------------------
Wed Jun 16 07:07:19 -  4180 - Ionic ISAPI Rewriting Filter (IIRF) 2.0.1.15 RELEASE
Wed Jun 16 07:07:19 -  4180 - IIRF was built on: Dec  3 2009 11:49:15
Wed Jun 16 07:07:19 -  4180 - Cached: DLL_PROCESS_ATTACH
Wed Jun 16 07:07:19 -  4180 - Cached: Process ID: 3304
Wed Jun 16 07:07:19 -  4180 - Cached: ReadServerConfig: Filter Priority is now: HIGH (0x80000)
Wed Jun 16 07:07:19 -  4180 - Cached: DLL_PROCESS_ATTACH - complete
Wed Jun 16 07:07:19 -  4180 - Cached: GetFilterVersion
Wed Jun 16 07:07:19 -  4180 - GetLogFile: app:'/LM/W3SVC/1/ROOT'  new log:'c:\temp\iirf.3304.log'
Wed Jun 16 07:07:19 -  4180 - ReadSiteConfig: actual log file 'c:\temp\iirf.3304.log'
Wed Jun 16 07:07:19 -  4180 - ReadSiteConfig: ini file: 'c:\inetpub\wwwroot\Iirf.ini'
Wed Jun 16 07:07:19 -  4180 - ReadSiteConfig: ini file timestamp: 2010/06/16 06:57:27 Central Daylight Time
Wed Jun 16 07:07:19 -  4180 - ReadSiteConfig: line   3: StatusUrl /iirfStatus
Wed Jun 16 07:07:19 -  4180 - ReadSiteConfig: line   3: StatusUrl is enabled for local requests only.
Wed Jun 16 07:07:19 -  4180 - ReadSiteConfig: line  11: RewriteRule (rule 1)  '^/test'  '/test/test1.html'   (null)
Wed Jun 16 07:07:19 -  4180 - ReadSiteConfig: line  12: RewriteRule (rule 2)  '^/test/(.*).html'  'http://localhost/test/test1.html'   (null)
Wed Jun 16 07:07:19 -  4180 - ReadSiteConfig: WARNING: line $d: Rewriting to a fully-qualified URL. Do you want RedirectRule or ProxyRule?
Wed Jun 16 07:07:19 -  4180 - ReadSiteConfig: Done reading, found 2 rules (0 errors, 1 warnings) on 13 lines
Wed Jun 16 07:07:19 -  4180 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Jun 16 07:07:19 -  4180 - HttpFilterProc: cfg= 0x018F5468
Wed Jun 16 07:07:19 -  4180 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Wed Jun 16 07:07:19 -  4180 - DoRewrites
Wed Jun 16 07:07:19 -  4180 - DoRewrites: Url (no decoding): '/iirfstatus'
Wed Jun 16 07:07:19 -  4180 - EvaluateRules: depth=0
Wed Jun 16 07:07:19 -  4180 - HttpFilterProc: SF_NOTIFY_LOG

Coordinator
Jun 16, 2010 at 4:51 PM
Edited Jun 16, 2010 at 4:56 PM

You have two rules there, and from your description, you need only one. I'm guessing that you were trying different things and just left one of the rules in there.  The second is almost definitely wrong - it attempts to rewrite to a fully-qualified URL, which is generally not done.  The first one might also be wrong, depending on what you really want.

You've said that you suspect the regex is wrong, but the problem is more basic than that.   Before you worry about the regular expression, you need to understand what it is you want to do with the requests.  Your description says you want to redirect requests, as opposed to rewrite, but your rules are both RewriteRule.  So I'm not certain what you really want. I think maybe you are not certain either.

I suggest you read the toplevel documentation page that describes the distinction between redirect and rewrite, and figure out what you really want.   If you want Redirect, then you should use RedirectRule, not RewriteRule.  (EDIT: if you are using v2.1, you can Alternatively use the [R] modifier on the RewriteRule directive.)

After you get clear on that, then you can figure out what rules you want to use, and what the regex'es ought to be, and I can help you with that.

 

Jun 17, 2010 at 2:55 PM

Hi Cheeso,

Thanks for the advise,i read the article and understood the difference between the redirect and rewrite. Actually these days am assigned to some new works due to resourse problem, so am not getting any time to go through and understand the documents well. My requirement is actually...Suppose we have a domain called   www.abc.com  then a particular request coming for   www.abc.com/ ab/bc/ cd need to redirect to a error page on the same server

www.abc.com/ab/bc/cd                  -> redirect to                             www.abc.com/ab/error.html

 

So for testing I have created a ISS environment in my desktop and created same environment here too. Here what am trying is

www.abc.com/test/test.html          -> redirect to                               www.abc.com/test/error.html

I believe in my logic the reading url pattern and redirect to a fully qualified domain making the problem.  Could you just give me redirectrule directive for above 2 my requests. Surely I have to go through more documents to implement further..but present give me guidance.

Thanks,

Kiran

 

Coordinator
Jun 17, 2010 at 4:06 PM

There are basic examples covering situations like this, included in the documentation.  Check the example ini files.  There are explanations, too.

It's too bad that you don't have time right now to understand the documents.  That's really the best path.  I hope you get more time soon.  Good luck! 

Jun 17, 2010 at 5:57 PM

Hi Cheeso,

Am understanding and going through documents.For my simple redirection do I need to split the url like you have said in parsing an http url or a below redirect link will work for mine. Actually I need to implement some more, so once i get a starting i believe I can do some more. My IIS version 5.1 and running in a xp professional, hope this wont be a problem. Why am trying is in our environment which is iis 6, we need to redirect a specifc url to a error page on required manner. by default i didnt see any url remapping in iis 6 like apache or iis 7 have. Though I am a beginner here am not understanding hows this directive reading from my input. Just give me a light for redirecting this one, rest i will do my best.

www.abc.com/test/test.html          -> redirect to                               www.abc.com/test/error.html

Below is the rule which one I have tried last.

RedirectRule  ^/test/test.html$  http://www.abc.com/test/error.html   [R=301]

 

Thanks,

Kiran

 

 

 

Coordinator
Jun 17, 2010 at 6:04 PM

Kiran, your rule looks fine.

You'll have to put it into a file called IIRF.ini, located in the physical directory corresponding to the virtual directory named /test .

When you do that, what results do you get?

Jun 17, 2010 at 8:47 PM

Hi Cheeso,

Yes its working, the problem I understood like /test was virtual directory in my environment and it was having a different root path and the ini file was not there. The iirf working perfectly, now i understood the

directive too, the problem was once up to its not running I was confused with a lot other things. Many thanks for your advise. Shall I ask you one more thing, if I set its rule to high, does its filter all my requested url before its process on IIS. Why I was trying this i need to avoid some request processing in IIS and later its going to the Weblogic and then apps. If IIRF redirecting all these request at IIS level itself then this one perfect for me.

Thanks,

Kiran.

Coordinator
Jun 17, 2010 at 10:44 PM
Hi Kiran, I'm glad it's working now. As for the filter priority, setting it to HIGH versus LOW affects the relative order in which the filter is invoked by IIS. IIS invokes high priority filters first, then filters with "NORMAL" or default priority, then filters with low priority. If multiple filters with the same priority are present in IIS, then ther order is not defined, as far as I know. I don't know WebLogic, but I guess it probably has an IIS filter or an IIS extension for integration into IIS. (There's a difference) If WebLogic uses a filter, and if you set up IIRF to be invoked before the WebLogic filter, then you'll be able to redirect incoming requests via IIRF, before they reach WebLogic. -Cheeso
Jun 18, 2010 at 12:52 PM

hi cheeso,

Sounds good..am able to see its giving a perfect result for my local IIS environmnet, now will be proceed with actual environment. Thanks for your support. Once I am able to fulfill the assignment which I have assigned, surely I will back and  will do my best to promote your software.

 

Thanks,

kiran.

Jun 18, 2010 at 1:56 PM

hi Cheeso,

Our environment is as below, which version I need to use IIRF 2  or 2.1 beta, advise me which suites my environment.

Windows Server 2003,SP 2 and 32 bit application.  IIS 6.0 / ASP 3.0

OS Name    Microsoft(R) Windows(R) Server 2003, Standard Edition
Version    5.2.3790 Service Pack 2 Build 3790

Thanks,

kiran

 

Coordinator
Jun 18, 2010 at 4:13 PM

The difference between v2.1 and v2.0 is relatively small and constrained: Several new features - RewriteMap and Proxy - and smaller bug fixes.  you can look at the release notes for IIRF v2.1, which documents all the changes.  The ReleaseNotes.txt document also references workitems that will provide additional detail.

My recommendation: If you use the RewriteMap directive or the ProxyPass directive, then you definitely want v2.1.  Actually ProxyPass was present in IIRF v2.0, but it was not at all functional in chunked situations, so I don't recommend depending on it.  If you are using v2.0 and have no problems, then I recommend staying with it.  It has been quite stable since December 2009.