Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Rewrite with a querystring not working Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
MarkEverest
Newbie
Newbie


Joined: 19 July 2010
Location: United Kingdom
Online Status: Offline
Posts: 5
Posted: 19 July 2010 at 11:00am | IP Logged Quote MarkEverest

Hello all,

I have installed the full verison of isapi_rewrite and have setup a proxy directive so that all traffic to my workstation in the folder 'ngis' (on any port) goes to another server. This is for testing purposes to check suitability before rolling out isapi_redirect to our prod servers.

 

I have a rule as follows:

RewriteRule ^ngis/(.+)$ http://10.2.25.157:8080/ngis/$1 [NC, P]

This works perfectly when I enter a URL as follows:

http://10.1.111.20:8080/ngis/QueryEngine.ptl/DocTree(%60/2007/MELBOURNE/R01%60,%601%60).xml

However, if I enter a UIRL with a querystring, such as:

http://10.1.111.20:8080/ngis/QueryEngine.ptl/DocTree(%60/2007/MELBOURNE/R01%60,%601%60).xml?VIEW=RAW

I get a "The page cannot be found" error.

Looking in the logs the steps appear to be the same. Here is the log entry for the two requests above:

10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:52:30 GMT [10.1.111.20/sid#1][rid#11050940/initial] (2) init rewrite engine with requested uri /ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:52:30 GMT [10.1.111.20/sid#1][rid#11050940/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:52:30 GMT [10.1.111.20/sid#1][rid#11050940/initial] (1) Htaccess process request c:\inetpub\wwwroot\.htaccess
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:52:30 GMT [10.1.111.20/sid#1][rid#11050940/initial] (3) applying pattern '^ngis/(.+)$' to uri 'ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml'
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:52:30 GMT [10.1.111.20/sid#1][rid#11050940/initial] (2) forcing proxy-throughput with
http://10.2.25.157:8080/ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:52:30 GMT [10.1.111.20/sid#1][rid#11050940/initial] (1) go-ahead with proxy request http://10.2.25.157:8080/ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml [OK]
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:52:30 GMT [10.1.111.20/sid#1][rid#11050940/initial] (1) Rewrite URL to >>
http://10.2.25.157:8080/ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xmlx.rwhlp?p=2
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:52:30 GMT [10.1.111.20/sid#1][rid#11050940/initial] (2) rewrite 'ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml' -> 'http://10.2.25.157:8080/ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xmlx.rwhlp?p=2'
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:52:30 GMT [10.1.111.20/sid#1][rid#11050940/initial] (2) internal redirect with
http://10.2.25.157:8080/ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xmlx.rwhlp?p=2 [INTERNAL REDIRECT]

10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:53:52 GMT [10.1.111.20/sid#1][rid#11050940/initial] (2) init rewrite engine with requested uri /ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml?VIEW=RAW
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:53:52 GMT [10.1.111.20/sid#1][rid#11050940/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:53:52 GMT [10.1.111.20/sid#1][rid#11050940/initial] (1) Htaccess process request c:\inetpub\wwwroot\.htaccess
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:53:52 GMT [10.1.111.20/sid#1][rid#11050940/initial] (3) applying pattern '^ngis/(.+)$' to uri 'ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml'
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:53:52 GMT [10.1.111.20/sid#1][rid#11050940/initial] (2) forcing proxy-throughput with
http://10.2.25.157:8080/ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml?VIEW=RAW
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:53:52 GMT [10.1.111.20/sid#1][rid#11050940/initial] (1) go-ahead with proxy request http://10.2.25.157:8080/ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml?VIEW=RAW [OK]
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:53:52 GMT [10.1.111.20/sid#1][rid#11050940/initial] (1) Rewrite URL to >>
http://10.2.25.157:8080/ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml?VIEW=RAWx.rwhlp?p=2
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:53:52 GMT [10.1.111.20/sid#1][rid#11050940/initial] (2) rewrite 'ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml' -> 'http://10.2.25.157:8080/ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml?VIEW=RAWx.rwhlp?p=2'
10.1.111.20 10.1.111.20  Mon, 19-Jul-2010  16:53:52 GMT [10.1.111.20/sid#1][rid#11050940/initial] (2) internal redirect with
http://10.2.25.157:8080/ngis/QueryEngine.ptl/DocTree(`/2007/MELBOURNE/R01`,`1`).xml?VIEW=RAWx.rwhlp?p=2 [INTERNAL REDIRECT]

As you can see, as far as isapi_rewrite is concerned it has done its bit. However, I can confirm that the target server does not receive the request (as we are debugging it at the time to try and diagnose the issue!)

 

The issue appears to be cauised by the existence of a '?' and some querystring parameters.

I have tried both RewriteRule and RewriteProxy and get the same issue.

 

Help please!



Edited by MarkEverest - 19 July 2010 at 11:00am
Back to Top View MarkEverest's Profile Search for other posts by MarkEverest
 
MarkEverest
Newbie
Newbie


Joined: 19 July 2010
Location: United Kingdom
Online Status: Offline
Posts: 5
Posted: 20 July 2010 at 3:26am | IP Logged Quote MarkEverest

Update - I have tried this on two more PCs.

Another 32-bit and the same issue occurs.

A 64-bit machine and it works.

Looks like a bug to me!!!!

Back to Top View MarkEverest's Profile Search for other posts by MarkEverest
 
AndrushkaUS
Admin Group
Admin Group


Joined: 13 November 2009
Location: United States
Online Status: Offline
Posts: 3159
Posted: 21 July 2010 at 6:04am | IP Logged Quote AndrushkaUS

Hello,
please, provide information on you Windows and IIS and ISAPI_Rewrite build.

Regards
Andrew

__________________
The will to conquer is the first condition of VICTORY
Back to Top View AndrushkaUS's Profile Search for other posts by AndrushkaUS
 
MarkEverest
Newbie
Newbie


Joined: 19 July 2010
Location: United Kingdom
Online Status: Offline
Posts: 5
Posted: 23 July 2010 at 7:18am | IP Logged Quote MarkEverest

Windows XP Pro - SP3

ISAPI Rewrite - 3.1.0.73

Back to Top View MarkEverest's Profile Search for other posts by MarkEverest
 
AndrushkaUS
Admin Group
Admin Group


Joined: 13 November 2009
Location: United States
Online Status: Offline
Posts: 3159
Posted: 26 July 2010 at 4:03am | IP Logged Quote AndrushkaUS

Oh, that's the issues of XP.
Please, create a ticket via helpdesk or email marking the subject "To Andrushka",
we'll try to help you using RDP or any kind of online meeting.

Regards
Andrew

__________________
The will to conquer is the first condition of VICTORY
Back to Top View AndrushkaUS's Profile Search for other posts by AndrushkaUS
 
MarkEverest
Newbie
Newbie


Joined: 19 July 2010
Location: United Kingdom
Online Status: Offline
Posts: 5
Posted: 26 July 2010 at 4:07am | IP Logged Quote MarkEverest

Hmmm ... as we were going to use ISAPI_REWRITE as a temporay solution whilst developing some new code, I think we will use Apache instead.

It provides the proxying that I want for free (instead of me having to buy 8 licenses of ISAPI_Rewrite) and it is working right now.

Thanks anyway.

 

Back to Top View MarkEverest's Profile Search for other posts by MarkEverest
 
hokushin
Newbie
Newbie


Joined: 27 July 2010
Location: Bahamas
Online Status: Offline
Posts: 9
Posted: 27 July 2010 at 10:34am | IP Logged Quote hokushin

I have in many ways similar problems. I am running ISAPI Rewrite - 3.1.0.73 on XP Pro SP3. Have you found any kind solution so far?
Back to Top View hokushin's Profile Search for other posts by hokushin
 
AndrushkaUS
Admin Group
Admin Group


Joined: 13 November 2009
Location: United States
Online Status: Offline
Posts: 3159
Posted: 29 July 2010 at 1:17am | IP Logged Quote AndrushkaUS

Hello,

Let me explain. The architecture cooperation of XP and its IIS is weak.
It supports only couple web-connections at a time.
Example: if someone is connected and is downloading smth from you, the other guy might not get the same file at the same time from you.
So when it comes to proxy rules XP is not the best system to deal with.

But we can still try to help you out and set up couple thing, so that it'll work.
Please, contact us via email or help desk, describing your issue. We'll arrange online meeting

Regards
Andrew

__________________
The will to conquer is the first condition of VICTORY
Back to Top View AndrushkaUS's Profile Search for other posts by AndrushkaUS
 
MarkEverest
Newbie
Newbie


Joined: 19 July 2010
Location: United Kingdom
Online Status: Offline
Posts: 5
Posted: 29 July 2010 at 2:07am | IP Logged Quote MarkEverest

XP limits you to 10 connections - for a development workstation this is fine. In over 10 years of ASP development I have NEVER reached this limit on a local PC.

ISAPI Rewrite on XP with a querystring specified does not work at all - sorry but the conenction limit for XP is not the issue in this case!

Back to Top View MarkEverest's Profile Search for other posts by MarkEverest
 
AndrushkaUS
Admin Group
Admin Group


Joined: 13 November 2009
Location: United States
Online Status: Offline
Posts: 3159
Posted: 29 July 2010 at 8:51am | IP Logged Quote AndrushkaUS

Mark,

It really turned out to be a bug.
Here's a new version, please, give it a try.

http://www.helicontech.com/download-isapi_rewrite3.htm

Regards
Andrew

__________________
The will to conquer is the first condition of VICTORY
Back to Top View AndrushkaUS's Profile Search for other posts by AndrushkaUS
 
hokushin
Newbie
Newbie


Joined: 27 July 2010
Location: Bahamas
Online Status: Offline
Posts: 9
Posted: 29 July 2010 at 10:21am | IP Logged Quote hokushin

Andrew,

Thanks a lot for greater details on the problem. Yesterday I migrated my application to IIS 7.5. It works fine now. The problem is that I still have some problems with several redirected links in my application. Sometimes when I press the links in question on my dev machine the application throws error 404.11 specific to IIS 7.5 (Request contains double escape sequence) What would you recommend to address the problem? The fact is everything works as it supposed to on production server powered by WS2003 and IIS6. IIS7.5 seems to be interpreted some rules in wrong way, as attack on the site. I am enclosing one rule from my config file. Any ideas about the problem?

RewriteRule ^/advertisement/([^\d\/\.]+)/([^\d\/\.]+)/([^\/]+)\+([^\d\/\+]+)\+filter/([^\/]+)\+([^\d\/\+]+)\+filter/([^\/]+)\+([^\d\/\+]+)\+filter/([^\/]+)\+([^\d\/\+]+)\+filter/?$ /advertisement/default.aspx?r=$1&cr=$2&$4_filter=$3&$6_filter=$5&$8_filter=$7&$10_filter=$9 [I,L]

MarkEverest, Thanks a lot for sharing your experience.

Back to Top View hokushin's Profile Search for other posts by hokushin
 
hokushin
Newbie
Newbie


Joined: 27 July 2010
Location: Bahamas
Online Status: Offline
Posts: 9
Posted: 29 July 2010 at 10:58am | IP Logged Quote hokushin

I've addressed the problem by adding the following lines to web.config file of my application but not quite sure it's a straight forward approach:

<system.webServer> 
    <security> 
        <requestFiltering allowDoubleEscaping="true"/> 
    </security> 
</system.webServer>
Back to Top View hokushin's Profile Search for other posts by hokushin
 
AndrushkaUS
Admin Group
Admin Group


Joined: 13 November 2009
Location: United States
Online Status: Offline
Posts: 3159
Posted: 30 July 2010 at 3:53am | IP Logged Quote AndrushkaUS

We have a nice solution to double-escape sequence described in this article http://www.helicontech.com/articles/plus-sign-in-iis7/.
Do not hesitate to ask in case any issues occur.

Regards
Andrew

__________________
The will to conquer is the first condition of VICTORY
Back to Top View AndrushkaUS's Profile Search for other posts by AndrushkaUS
 
hokushin
Newbie
Newbie


Joined: 27 July 2010
Location: Bahamas
Online Status: Offline
Posts: 9
Posted: 30 July 2010 at 10:00am | IP Logged Quote hokushin

Andrew, thanks a lot for the article. I've made extra changes in IIS as well.
Back to Top View hokushin's Profile Search for other posts by hokushin
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum