| Author |
|
fasslej Newbie

Joined: 07 July 2010
Online Status: Offline Posts: 17
|
| Posted: 07 July 2010 at 1:27pm | IP Logged
|
|
|
I am using a WebSphere plugin alongside ISAPI Rewrite. There is, according to Helicon Support, issues with version 3 loading before the WAS plugin, so they suggested moving to version 2.
Now, in version 2, my redirects are working correctly, but now rewrites are not working. I have tried default and "New" style rewrites and they both fail. They seem to be breaking the session.
I have removed all other ISAPI filters (ASP and WebSphere) and I'm still getting the same results.
Here are samples of the headers in the broken v2 and the old working v3:
Example Rule: RewriteRule ^/jeremy/$ http\://www.mywebsitename.org [I,RP]
HEADER RESULTS: (notice the location field is missing and the http: URL is being sent as a parameter instead. It appears that URL is not being escaped properly. Also notice how the Pragma header is chopped off, leaving only a ": no-cache". This is really weird.
INCORRECT (using version 2) -------------------------------------------------------------------------------- HTTP/1.1 301 Moved Permanently Date: Tue, 06 Jul 2010 23:44:14 GMT Server: Microsoft-IIS/6.0 http: //www.mywebsitename.org
: no-cache Content-Type: text/html Content-Length: 153 Location: http://www.mywebsitename.org
<html><body>The requested resource was moved. It could be found here: <a href="http://www.mywebsitename.org">http://www.mywebsitename.org</a></body></html> --------------------------------------------------------------------------------
Now here is what it looks like using ASAPI Rewrite 3, which was working correctly for us:
-------------------------------------------------------------------------------- HTTP/1.1 301 Moved Permanently Date: Tue, 06 Jul 2010 23:51:57 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Location: http://www.mywebsitename.org Content-Length: 237 Content-type: text/html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1><p>The document has moved <a href="http://www.mywebsitename.org">here</a>.</p> </body></html> --------------------------
No parse errors in the INI files.
Global INI (also tried without RFStyle New) -------------------------------------- [ISAPI_Rewrite] RFStyle New CacheClockRate 3600 RepeatLimit 32
# Block external access to the httpd.ini and httpd.parse.errors files RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [F,I,O] # Block external access to the Helper ISAPI Extension RewriteRule .*\.isrwhlp / [F,I,O] --------------------------------------
Site INI -------------------------------------- [ISAPI_Rewrite]
RewriteCond Host: www\.jeremy\.mywebsitename\.org RewriteRule (.*) http\://jeremy.mywebsitename.org$1 [I,RP]
RewriteRule ^/jeremy/$ http\://www.mywebsitename.org [I,RP]
RewriteRule ^/test/(.*)/(.*)/(.*)/$ /test/\?action=$1&sitecfg=$2&masterid=$3 [I,L]
--------------------------------------
Note that the rewrites now work properly, but the redirects are broken.
|
| Back to Top |
|
| |
fasslej Newbie

Joined: 07 July 2010
Online Status: Offline Posts: 17
|
| Posted: 07 July 2010 at 1:31pm | IP Logged
|
|
|
Summary for those who dont want to read all the above. My guess is that ISAPI_Rewrite 2 seems to not be escaping the redirect path properly, causing the header to be malformed.
|
| Back to Top |
|
| |
fasslej Newbie

Joined: 07 July 2010
Online Status: Offline Posts: 17
|
| Posted: 07 July 2010 at 2:02pm | IP Logged
|
|
|
Wow, huge fine.
If I put the exact same rules into the global httpd.ini file, they work fine. However, if they are at the site level, they break with the above problems.
Any idea why?
|
| Back to Top |
|
| |
fasslej Newbie

Joined: 07 July 2010
Online Status: Offline Posts: 17
|
| Posted: 07 July 2010 at 2:27pm | IP Logged
|
|
|
This new find only works with the "RFStyle New" on, but still not at the site level.
|
| Back to Top |
|
| |
horizonm Newbie

Joined: 08 July 2010
Online Status: Offline Posts: 4
|
| Posted: 08 July 2010 at 6:41pm | IP Logged
|
|
|
Hey... I've been using ISAPI Rewrite 2.0 for years. I just installed it on my new server and am having this same exact issue. It's as though it's not sending all the information. It works fine with a 302 redirect, just not a RP, 301 redirect.
I'm still digging and I'll let you know if I find anything. THe server I'm using is a dedicated Windows 2003 Server, Web Edition. As far as I can tell, that's the only difference between my other server. This is Web Edition and the others are standard edition.
I host with Godaddy. I do not use websphere. I do have a Cisco PIX 501 hardware firewall in front of the machine. I post this thinking that it might help to find a similarity in configurations.
|
| Back to Top |
|
| |
fasslej Newbie

Joined: 07 July 2010
Online Status: Offline Posts: 17
|
| Posted: 08 July 2010 at 6:45pm | IP Logged
|
|
|
Windows 2003 Server, Standard Edition here.
We have Cisco hardware as well. I believe the Cisco ASA series. Glad to see that I'm not alone at least.
|
| Back to Top |
|
| |
horizonm Newbie

Joined: 08 July 2010
Online Status: Offline Posts: 4
|
| Posted: 08 July 2010 at 6:54pm | IP Logged
|
|
|
here is some more information. I went to an online tool that tests server headers:
http://www.seoconsultants.com/tools/headers
The results were:
#1 Server Response: http://appmtnphotocomp.org FollowRedirects=False; Server requested redirection, but sent no new location.
My rewrite rule is:
[ISAPI_Rewrite]
RewriteCond host: (?!^www.appmtnphotocomp.org)(.+) RewriteRule /(.*) https\://www.appmtnphotocomp.org/$2 [I,RP]
Basically, if the url is not www.appmtnphotocomp.org, redirect to that URL.
This is what is being returned from the server as it appears in Firefox: cache
Content-Type: text/html
Content-Length: 163
Location: https://www.appmtnphotocomp.org/
<html><body>The requested resource was moved. It could be found here: <a href="https://www.appmtnphotocomp.org/">https://www.appmtnphotocomp.org/</a></body></html>
I've searched the forums and don't see anything that would prevent this from working in 2003 web edition.
|
| Back to Top |
|
| |
fasslej Newbie

Joined: 07 July 2010
Online Status: Offline Posts: 17
|
| Posted: 08 July 2010 at 6:57pm | IP Logged
|
|
|
Yeah, it sure looks like you are having the same thing as me. I haven't heard back from anyone at Helicon yet, but I do have a ticket open. Maybe you should too.
|
| Back to Top |
|
| |
horizonm Newbie

Joined: 08 July 2010
Online Status: Offline Posts: 4
|
| Posted: 08 July 2010 at 7:08pm | IP Logged
|
|
|
I did some further looking around. On the server that this works on, I have a version of the dll (2,9,0,52) which was created on 6/17/2006.
The new version I installed today is 2,15,0,75 and was created on 6/28/2010. Perhaps they released a new version and there is something wrong with the [RP] directive. I'm thinking about replacing the dll from the old server to the new server, but I don't know if it will affect the rwhelper.dll???
|
| Back to Top |
|
| |
horizonm Newbie

Joined: 08 July 2010
Online Status: Offline Posts: 4
|
| Posted: 08 July 2010 at 7:19pm | IP Logged
|
|
|
All right... I found a temporary workaround. I uninstalled the current version download:
http://www.isapirewrite.com/download/isapi_rwf_x86_0075.msi
Then, I installed an older version (2,12,0,55) from the following URL:
http://www.isapirewrite.com/download/isapi_rwf_x86_0073.msi
and my problem was solved. Looks like in the latest release something got mixed up in the [RP] directive.
Hope this helps you, and Helicon in trying to fix this.
Joe
|
| Back to Top |
|
| |
fasslej Newbie

Joined: 07 July 2010
Online Status: Offline Posts: 17
|
| Posted: 09 July 2010 at 11:29am | IP Logged
|
|
|
Great work. I'll test right now. This has caused me a lot of headache :)
|
| Back to Top |
|
| |
fasslej Newbie

Joined: 07 July 2010
Online Status: Offline Posts: 17
|
| Posted: 09 July 2010 at 11:55am | IP Logged
|
|
|
horizonm,
You rock. Downgraded and it's working great now!
Now if only I could get version 3 to work with my other plugin I'd be totally happy :P
|
| Back to Top |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 8118
|
| Posted: 13 July 2010 at 6:00am | IP Logged
|
|
|
I have fixed this bug. A fixed version will be available in a few days.
|
| Back to Top |
|
| |