| Author |
|
petestorey Newbie

Joined: 06 June 2005 Location: United Kingdom
Online Status: Offline Posts: 15
|
| Posted: 15 September 2010 at 6:44am | IP Logged
|
|
|
Hi
I've got an site running with a load of rewrite rule
working fine, however I need a proxy to work and I just
cannot get it going.
I have a site running on www.domain.com and I want the
/blog/* to be proxied to blog.domain.com/blog/*. Simple
enough I thought; rule added to httpd.ini on the www
site:
RewriteProxy /blog(/.*) http://blog.domain.com/blog/$1
When I try to go to www.domain.com/blog/201007/travel-
updates/australian-election-saturday-21st-august-
2010.html , I get a 404 page returned back. In the IIS
log it shows (for example):
2010-09-15 11:15:11 W3SVC1994707410 GET
/blog/201007/travel-updates/australian-election-saturday-
21st-august-2010x.isrwhlp proxy 80 200
Which implies to me it's returning HTTP 200 OK even
though clearly it's not.
Looking at what's returned to the browser, I'm getting:
HTTP/1.1 404 /blog/201007/travel-updates/australian-
election-saturday-21st-august-2010x.isrwhlp
which is odd to say the least. I've uninstalled isapi
rewrite, reinstalled, run the proxycfg.vbs -r command,
restarted and so on and all to no avail.
What on earth is happening? The requests aren't making
it through to the blog.domain.com server as have checked
the logs there.
Ideas pleeeeeeeeease this has wasted 3 days of my time so
far!!
thanks
Pete
|
| Back to Top |
|
| |
petestorey Newbie

Joined: 06 June 2005 Location: United Kingdom
Online Status: Offline Posts: 15
|
| Posted: 15 September 2010 at 6:50am | IP Logged
|
|
|
PS sorry running IIS6 on win2k3 server. The rwhelper.dll
file is allowed in web server extensions, and .isrwhlp is
set as an extension in application extensions.
I've tried allowing all extensions too and still noooo joy.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 15 September 2010 at 8:10am | IP Logged
|
|
|
Hello, Pete
First, please fix your rule like this:
RewriteProxy /blog(/.*) http\://blog.domain.com/blog$1
Second, please make sure you don't have ISAPI_Rewrite dll registered on both server and site levels. It should be on server level only.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
petestorey Newbie

Joined: 06 June 2005 Location: United Kingdom
Online Status: Offline Posts: 15
|
| Posted: 16 September 2010 at 12:54am | IP Logged
|
|
|
Hi Anton
I've tried that change and checked the filter and it is
only on the server level but still exactly the same.
Even if I say put in a rule into the global httpd.ini of
say:
RewriteProxy .* http\://www.google.com/
It gives me the site's 404 for any site on the server.
Doesn't matter if I put the .* in brackets or not btw,
not that it should.
It just seems that the system won't pick up the .isrwhlp
extension and pass to the isapi extension, instead
recording it in the log and seemingly looking for the
file or something.
thanks
Pete
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 16 September 2010 at 2:30am | IP Logged
|
|
|
Just to be sure - please confirm you are using Full not Lite version of ISAPI_Rewrite.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
petestorey Newbie

Joined: 06 June 2005 Location: United Kingdom
Online Status: Offline Posts: 15
|
| Posted: 16 September 2010 at 5:33am | IP Logged
|
|
|
Yup, and it works fine for every other function (and has
been for several years!)
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 16 September 2010 at 7:33am | IP Logged
|
|
|
Is it possible to get RDP access to you server or arrange a meeting for you to show me some settings?
If yes, please specify the suitable time and access credentials to support@helicontech.com with reference to this forum thread.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
Programmer27 Newbie

Joined: 30 January 2008
Online Status: Offline Posts: 10
|
| Posted: 11 October 2010 at 1:12pm | IP Logged
|
|
|
Have you gotten this to work? I am having the same problem, and I would really like some direction...
|
| Back to Top |
|
| |
petestorey Newbie

Joined: 06 June 2005 Location: United Kingdom
Online Status: Offline Posts: 15
|
| Posted: 12 October 2010 at 3:24am | IP Logged
|
|
|
Sorry, no I didn't. The problem appears to be something to
do with the filter trying to reach the extension at the
wrong URL - instead of using the .isrwhlp 'file' extension
it was trying to go to /isrwhlp/rwhelper.dll?proxy .
Anyway I 'fixed' by installing the free IIRF filter and
configuring that for the proxy instead which worked fine.
It might be something residual in the registry settings or
the like, I don't know, but I couldn't make it work on 5
separate servers so I don't know what was wrong!
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 12 October 2010 at 5:17am | IP Logged
|
|
|
@Programmer27:
Could you please explain your problem in details, specifying the configs you have and the scenario you want to implement.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
Programmer27 Newbie

Joined: 30 January 2008
Online Status: Offline Posts: 10
|
| Posted: 12 October 2010 at 8:36am | IP Logged
|
|
|
We decided to take another route that seems to be working, since using the proxy looked like it would create performance problems..
Thanks!
|
| Back to Top |
|
| |
petestorey Newbie

Joined: 06 June 2005 Location: United Kingdom
Online Status: Offline Posts: 15
|
| Posted: 14 October 2010 at 5:39am | IP Logged
|
|
|
For anyone in future, I think what the problem was related
to (though I still couldn't fix it) was that we were
running Tomcat as well, and the Tomcat ISAPI filter was
grabbing the request to the ISAPI Rewrite extension before
it got to the extension and returning a 404 because Tomcat
obviously knows nothing about it. It _Should_ then work if
you exclude the .isrwhlp extension from Tomcat's filter.
There seemed to be another problem as well as this didn't
actually fix it but I think this was the core problem.
|
| Back to Top |
|
| |
Programmer27 Newbie

Joined: 30 January 2008
Online Status: Offline Posts: 10
|
| Posted: 25 January 2011 at 1:47pm | IP Logged
|
|
|
@Anton, We are back to this problem. I tried upgrading to the latest isapi filter (version 3) and still no luck. This is the line in my .htaccess file:
RewriteProxy ^/((?:[0-9A-Za-z\-_]|%20)+)\.html$ http://www.mysite.com/SiteFolder/page.aspx?sku=$1
SiteFolder is in a separate application pool so the Proxy is needed. Any suggestions? I made sure the extensions are mapped correctly..
|
| Back to Top |
|
| |
petestorey Newbie

Joined: 06 June 2005 Location: United Kingdom
Online Status: Offline Posts: 15
|
| Posted: 26 January 2011 at 3:24am | IP Logged
|
|
|
I got it working in the end after realising the problem was
with a second filter I had on IIS. The ISAPI Rewrite
filter makes a second request internally to IIS to call the
extension which powers the proxy, which in my case was
getting picked up by the Tomcat filter I had installed
which was sending to Tomcat instead of allowing the
extension to do its job. Have a look to see if there are
any other filters which might be stopping access to the
extension?
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 26 January 2011 at 8:33am | IP Logged
|
|
|
@Programmer27:
Please show the testing request you make and show the complete config you are having.
Also please enable logging in httpd.conf as follows:
RewriteLogLevel 9
Then make the request in question and check the rewrite.log in ISAPI_Rewrite installation folder.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
Programmer27 Newbie

Joined: 30 January 2008
Online Status: Offline Posts: 10
|
| Posted: 27 January 2011 at 9:44am | IP Logged
|
|
|
.htaccess looks like this:
RewriteEngine On RewriteCompatibility2 On RepeatLimit 32 RewriteBase # unsupported directive: [ISAPI_Rewrite]
RewriteProxy ^/test1.tpl$ http://www.mysite.com/searchsite/test.tpl [NC,L]
-------------------------------------------------------
The log files shows this:
000.000.000.000 000.000.000.000 Thu, 27-Jan-2011 10:37:16 GMT [www.mysite.com/sid#1598434434][rid#18686184/initial] (2) init rewrite engine with requested uri /test1.tpl 000.000.000.000 000.000.000.000 Thu, 27-Jan-2011 10:37:16 GMT [www.mysite.com/sid#1598434434][rid#18686184/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 000.000.000.000 000.000.000.000 Thu, 27-Jan-2011 10:37:16 GMT [www.mysite.com/sid#1598434434][rid#18686184/initial] (3) applying pattern '^/test1.tpl$' to uri '/test1.tpl' 000.000.000.000 000.000.000.000 Thu, 27-Jan-2011 10:37:16 GMT [www.mysite.com/sid#1598434434][rid#18686184/initial] (2) forcing proxy-throughput with http://www.mysite.com/subfolder/test.tpl 000.000.000.000 000.000.000.000 Thu, 27-Jan-2011 10:37:16 GMT [www.mysite.com/sid#1598434434][rid#18686184/initial] (1) go-ahead with proxy request http://www.mysite.com/subfolder/test.tpl [OK] 000.000.000.000 000.000.000.000 Thu, 27-Jan-2011 10:37:16 GMT [www.mysite.com/sid#1598434434][rid#18686184/initial] (1) Rewrite URL to >> /test1.tplx.rwhlp?p=0 000.000.000.000 000.000.000.000 Thu, 27-Jan-2011 10:37:16 GMT [www.mysite.com/sid#1598434434][rid#18686184/initial] (2) rewrite '/test1.tpl' -> '/test1.tplx.rwhlp?p=0' 000.000.000.000 000.000.000.000 Thu, 27-Jan-2011 10:37:16 GMT [www.mysite.com/sid#1598434434][rid#18686184/initial] (2) internal redirect with /test1.tplx.rwhlp?p=0 [INTERNAL REDIRECT]
-------------------------------------------------------
The isapi filter is not registed at the site level - only at the global 'web sites' level.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 28 January 2011 at 3:19am | IP Logged
|
|
|
The log says it's working.
And what result do you actually get? What is the resulting page/error?
BTW, do you have any rules in global httpd.conf file?
__________________ Regards,
Anton
|
| Back to Top |
|
| |
Programmer27 Newbie

Joined: 30 January 2008
Online Status: Offline Posts: 10
|
| Posted: 31 January 2011 at 8:46am | IP Logged
|
|
|
The error i get is HTTP/1.1 404 Not Found. My httpd.conf is the same as the .htaccess.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 31 January 2011 at 9:13am | IP Logged
|
|
|
Please remove the proxy rule from your httpd.conf and retry.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
Programmer27 Newbie

Joined: 30 January 2008
Online Status: Offline Posts: 10
|
| Posted: 31 January 2011 at 10:01am | IP Logged
|
|
|
I just did, it did not help...
|
| Back to Top |
|
| |