www.site.com.local -> www.site.com

Sep 10, 2009 at 11:18 AM

Please, help me create this rule

Coordinator
Sep 10, 2009 at 4:10 PM

The first thing you wanna do is read the fine manual.

There's an example that covers this.

Sep 10, 2009 at 6:16 PM

I trying this

IterationLimit 10
MaxMatchCount 10
RewriteEngine ON
StatusUrl /iirfStatus

RewriteCond %{HTTP_HOST}        ^www\.site\.com\.local$
RewriteRule   ^/(.*)$          http://www.site.com/$1    [L]

but it doesn't have any effect. What's wrong in my construction?

Coordinator
Sep 10, 2009 at 7:03 PM

I think what you want is a REDIRECT not a REWRITE, and in that case you must use RedirectRule, not RewriteRule.

 

Sep 10, 2009 at 7:28 PM

I need replace value in server variable HTTP_HOST without redirecting. It's possible?

Coordinator
Sep 10, 2009 at 10:33 PM

Try RewriteHeader

Sep 10, 2009 at 11:05 PM

I replace string started with RewriteRule to:

RewriteHeader   Host:          .*            www.site.com

 

but it still not working

Coordinator
Sep 11, 2009 at 1:21 AM

And did you look in the log file?  What did you see there?

 

Sep 11, 2009 at 7:05 AM

In my ini config I added this strings:

RewriteLog c:\isapi_log\iirf

RewriteLogLevel 3

But log file not exists in this directory. ISAPI filter added for all sites and its turned on with low priority

Coordinator
Sep 11, 2009 at 12:40 PM

ok, follow the instructions on verifying and troubleshooting your install.

 

Sep 11, 2009 at 1:56 PM

ok, finally I have a log:

--------------------------------------------
Fri Sep 11 15:40:32 -  3728 - ReadConfig: setting LogLevel to 3
Fri Sep 11 15:40:32 -  3728 - ReadConfig: line   8: RewriteCond %{HTTP_HOST}                                   ^www\.site\.com\.local$               
Fri Sep 11 15:40:32 -  3728 - ReadConfig: line   9: RewriteHeader (rule 1)  'Host:'  '.*'  'www.site.com'   (null)
Fri Sep 11 15:40:32 -  3728 - ReadConfig: Done reading, found 1 rules (0 errors, 0 warnings) on 10 lines

--------------------------------------------
Fri Sep 11 15:40:32 -  3728 - Initialize: Ionic ISAPI Rewriting Filter (IIRF) v1.2.16 R7
Fri Sep 11 15:40:32 -  3728 - Initialize: config file 'C:\WINDOWS\isapi\IsapiRewrite4.ini'
Fri Sep 11 15:40:32 -  3728 - Initialize: File watcher thread created.
Fri Sep 11 15:40:32 -  3728 - GetFilterVersion
Fri Sep 11 15:40:32 -  2424 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Sep 11 15:40:32 -  2424 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Sep 11 15:40:32 -  2424 - DoRewrites
Fri Sep 11 15:40:32 -  2424 - DoRewrites: Url: '/favicon.ico'
Fri Sep 11 15:40:32 -  2424 - EvaluateRules: depth=0
Fri Sep 11 15:40:32 -  2424 - GetHeader_AutoFree failed (GetLastError()=87)

In Event Viewer I have application error:

Faulting application w3wp.exe, version 6.0.3790.3959, faulting module IsapiRewrite4.dll, version 0.0.0.0, fault address 0x000055e8.

Coordinator
Sep 11, 2009 at 5:48 PM

Hmm, ok, seems like IIRF is crashing.  Let me look into it.

 

Coordinator
Sep 11, 2009 at 9:26 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Sep 11, 2009 at 9:43 PM

There is a bug in IIRF R7 regarding the RewriteHeader directive.  Thanks for reporting this.

If you try R8, you may find that it works better.