Problem Rewriting

Topics: User Forum
Nov 2, 2011 at 3:56 PM

Hi all,

i installed IIRF to achieve the following:

https://srveos/svnroot/dev/xxx -> http://srveos:8080/dev/xxx

 or, if not possible

https://srveos/svnroot/dev/xxx -> https://srveos:8433/dev/xxx

I wrote the following rules (not active in the same time):

1. RewriteRule ^/svnroot/(.*)S  https://srveos:8443/$1 [I]

2. RedirectRule ^/svnroot/(.*$  http://srveos:8080/$1 [R=301]

The RedirectRule worked, but the browser changed the address in the bar.

The RewriteRule failed with 404.  The log file is:

Wed Nov 02 15:53:30 - 11180 - -------------------------------------------------------
Wed Nov 02 15:53:30 - 11180 - Ionic ISAPI Rewriting Filter (IIRF) 2.1.2.2 x64 RELEASE
Wed Nov 02 15:53:30 - 11180 - IIRF was built on: Oct 26 2011 20:41:30
Wed Nov 02 15:53:30 - 11180 - Cached: DLL_PROCESS_ATTACH
Wed Nov 02 15:53:30 - 11180 - Cached: Process ID: 11244
Wed Nov 02 15:53:30 - 11180 - Cached: ReadServerConfig: C:\Programmi\Ionic Shade\IIRF 2.1\IirfGlobal.ini(23): Filter Priority is now: HIGH (0x80000)
Wed Nov 02 15:53:30 - 11180 - Cached: ReadServerConfig: C:\Programmi\Ionic Shade\IIRF 2.1\IirfGlobal.ini(46): NotifyLog setting is now: OFF
Wed Nov 02 15:53:30 - 11180 - Cached: ReadServerConfig: C:\Programmi\Ionic Shade\IIRF 2.1\IirfGlobal.ini(63): RewriteEngine setting is now: ON
Wed Nov 02 15:53:30 - 11180 - Cached: DLL_PROCESS_ATTACH - complete
Wed Nov 02 15:53:30 - 11180 - Cached: GetFilterVersion
Wed Nov 02 15:53:30 - 11180 - GetLogFile: app:'/LM/W3SVC/1/ROOT'  new log:'e:\svnroot\iirf.log.11244.log'
Wed Nov 02 15:53:30 - 11180 - ReadVdirConfig: actual log file 'e:\svnroot\iirf.log.11244.log'
Wed Nov 02 15:53:30 - 11180 - ReadVdirConfig: ini file: 'c:\inetpub\wwwroot\Iirf.ini'
Wed Nov 02 15:53:30 - 11180 - ReadVdirConfig: ini file timestamp: 2011/11/02 15:20:43 ora solare Europa occidentale
Wed Nov 02 15:53:30 - 11180 - ReadVdirConfig: cfg(0x02AA8D60)
Wed Nov 02 15:53:30 - 11180 - ReadVdirConfig: LogLevel = 3
Wed Nov 02 15:53:30 - 11180 - ReadVdirConfig: c:\inetpub\wwwroot\Iirf.ini(14): RewriteRule (rule 1)  '^/svnroot/(.*)$'  'https://srveos:8443/$1'      [I]
Wed Nov 02 15:53:30 - 11180 - ReadVdirConfig: c:\inetpub\wwwroot\Iirf.ini(14): WARNING: Rewriting to a fully-qualified URL. Probably wrong. You may want RedirectRule or ProxyPass.
Wed Nov 02 15:53:30 - 11180 - CountIniLines: ini file c:\inetpub\wwwroot\Iirf.ini (17 lines)
Wed Nov 02 15:53:30 - 11180 - ReadVdirConfig: Done reading INI for the root vdir, found 1 rules (0 errors, 1 warnings) on 17 lines, in 1 modules
Wed Nov 02 15:53:30 - 11180 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Nov 02 15:53:30 - 11180 - HttpFilterProc: cfg= 0x02AA8D60
Wed Nov 02 15:53:30 - 11180 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Wed Nov 02 15:53:30 - 11180 - DoRewrites
Wed Nov 02 15:53:30 - 11180 - DoRewrites: Url (decoded): '/svnroot/dev/eos'
Wed Nov 02 15:53:30 - 11180 - EvaluateRules: depth=0
Wed Nov 02 15:53:30 - 11180 - EvaluateRules: no RewriteBase
Wed Nov 02 15:53:30 - 11180 - EvaluateRules: Rule 1: 2 match
Wed Nov 02 15:53:30 - 11180 - ApplyUrlEncoding: out 'https://srveos:8443/dev/eos'
Wed Nov 02 15:53:30 - 11180 - EvaluateRules: Result (length 27): https://srveos:8443/dev/eos
Wed Nov 02 15:53:30 - 11180 - EvaluateRules: depth=1
Wed Nov 02 15:53:30 - 11180 - EvaluateRules: no RewriteBase
Wed Nov 02 15:53:30 - 11180 - EvaluateRules: Rule 1: -1 (No match)
Wed Nov 02 15:53:30 - 11180 - EvaluateRules: returning 0
Wed Nov 02 15:53:30 - 11180 - EvaluateRules: returning 1
Wed Nov 02 15:53:30 - 11180 - DoRewrites: Rewrite Url to: 'https://srveos:8443/dev/eos'
Wed Nov 02 15:53:30 - 11180 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Nov 02 15:53:30 - 11180 - HttpFilterProc: cfg= 0x02AA8D60

 

My guess is that it is correct but the result on the browser is 404.

Any problems with https ?

Any idea?

Coordinator
Nov 2, 2011 at 5:37 PM
stefano_mora wrote:

Hi all,

i installed IIRF to achieve the following:

https://srveos/svnroot/dev/xxx -> http://srveos:8080/dev/xxx

 or, if not possible

https://srveos/svnroot/dev/xxx -> https://srveos:8433/dev/xxx

 


Read the IIRF documentation.  The -> you use in your question does not mean anything to me. There is a difference between rewriting and redirecting, and you need to understand the difference in order to be able to use IIRF.  I have explained these concepts in some detail in the IIRF documentation. When you understand the difference you will understand the things you are seeing and reporting. 

 

Nov 2, 2011 at 5:43 PM

Cheeso,

i'm sorry, they are not rules! They only are the rewrite i'd like to obtain ... and Yes, i'd like to have a Rewrite action.

Coordinator
Nov 2, 2011 at 6:58 PM

Yes, I understand they are not rules.  Using -> might indicate a clear meaning to you, but it is not clear to me.   IIRF can do one of three things with a URL: it can Rewrite, it can Redirect, or it can Proxy.  When you write  ->  I suppose you intend one of those things but it is not clear to me which one.

In English, you say that you want a rewrite; but you have tried to use a RedirectRule.  Why?  A RedirectRule does not perform a Rewrite, it performs a Redirect.  Why would you use RedirectRule if what you want is a Rewrite?

On the other hand, you have also tried to use RewriteRule.  But with RewriteRule, you have specified a full URL.  But this makes no sense; the documentation is very clear on this.  Even if you did not read the documentation, if you are clear on what it means to Rewrite, you would know that you cannot include a scheme and server name and port in the replacement string for a RewriteRule.   If you had read the documentation, you would see numerous recommendations to check the IIRF log file, and check the /iirfstatus URL, where you would see warnings about the rule you have written.   

So it seems to me (a) you are not clear on what it means to rewrite or redirect, and (b) you have not read the documentation where this is clearly explained.

As I said before, Read the Documentation.