Bug? Win 2008 R2, APE 0076/0081 beta vs ISAPI rewrite 0095

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 4
Joined: 14 Oct 2012, 21:06

Bug? Win 2008 R2, APE 0076/0081 beta vs ISAPI rewrite 0095

14 Oct 2012, 21:19

Hi,

I think I may have stumbled across a bug in APE?

I'm running win 2008 R2, IIS 7.5 and coldfusion 10 (all with latest patches)

Example request: /company/?d=3

-- https.conf only -- not using .htaccess for individual sites

Options All -StopOnError

RewriteEngine on

RewriteCond %{REQUEST_URI} (.*)
RewriteHeader X-OLD-URL: .* %1

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/([a-z0-9-]+)/$ /index.cfm/p/pages.$1 [NC,L,NS]


-- APE result (version 0076 and 0081 beta) --
cgi.path_info:
Original-Url: /company/
X-Rewrite-Url: /company/
X-OLD-URL: /company/?d=3

-- ISAPI rewrite result (version 0095) --
cgi.path_info: /p/pages.company
Original-Url: /jakarta/isapi_redirect.dll
X-Rewrite-Url: /jakarta/isapi_redirect.dll
X-OLD-URL: /company/


Notice how the cgi variable path_info is blank when using APE. It also incorrectly includes the URL vars in X-OLD-URL. When using ISAPI rewrite though, it works perfectly.

I would really like to use APE instead of ISAPI rewrite because of all the other stuff it offers. So is that a bug, or how do I go about getting APE to show the same results as ISAPI rewrite - specifically I need X-OLD-URL and the cgi path_info vars to be set correctly.

Thanks.

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Bug? Win 2008 R2, APE 0076/0081 beta vs ISAPI rewrite 00

15 Oct 2012, 05:20

Hello,

What you found out is not a bug. The thing is that Ape starts working on an earlier stage than ISAPI_Rewrite, that's why some data is not yet available to it.
Please try to change the sequence of modules' execution in IIS so that Jakarta goes before .NET.

User avatar
Posts: 4
Joined: 14 Oct 2012, 21:06

Re: Bug? Win 2008 R2, APE 0076/0081 beta vs ISAPI rewrite 00

15 Oct 2012, 18:19

Hi Anton,

Thanks for the suggestion, that sounds positive. I've had a look at the modules in IIS and handler mappings and cant see how to do that though?

I've included some screenshots of what I see, could you please let me know what to move. I'd greatly appreciate it.


picture 2012-10-15 at 5.11.44 PM.png
picture 2012-10-15 at 5.11.44 PM.png (70.93 KiB) Viewed 4835 times


picture 2012-10-15 at 5.15.48 PM.png
picture 2012-10-15 at 5.15.48 PM.png (16.33 KiB) Viewed 4835 times


picture 2012-10-15 at 5.16.23 PM.png
picture 2012-10-15 at 5.16.23 PM.png (16.1 KiB) Viewed 4835 times

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Bug? Win 2008 R2, APE 0076/0081 beta vs ISAPI rewrite 00

16 Oct 2012, 06:44

Hello,

In IIS go to Server -> Modules -> View Ordered List and move the necessary module (for Jakarta) up using arrows.

User avatar
Posts: 4
Joined: 14 Oct 2012, 21:06

Re: Bug? Win 2008 R2, APE 0076/0081 beta vs ISAPI rewrite 00

16 Oct 2012, 12:19

Anton,

As far as I can see, there is no jakarta module. There is only a .cfm handler mapping and the tomcat ISAPI filter (both for coldfusion), as seen in the screenshots.

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Bug? Win 2008 R2, APE 0076/0081 beta vs ISAPI rewrite 00

17 Oct 2012, 06:35

Hello,

I've accidentally realized one thing that might be causing problems: you have ISAPI_Rewrite filters registered along with Ape.
Please try removing them and check if it changes the outcome.

User avatar
Posts: 4
Joined: 14 Oct 2012, 21:06

Re: Bug? Win 2008 R2, APE 0076/0081 beta vs ISAPI rewrite 00

17 Oct 2012, 06:58

Anton - nope it wasn't that, but thanks for the assistance!

I found out what the problem was - it was a coldfusion filter bug. I'm looking forward to using all the other mods now ;)

For anyone else who stumbles upon this issue, make sure that after every CF update, you run the "Web Server Config Tool" and also confirm that the tool is updating the isapi filter AND /jakarta mappings. I've just found that ours hasn't been updating (running win 2008 r2), so we were still sitting on \ColdFusion10\config\wsconfig\1\. I've had to manually edit the applicationHost.config file and replace all references to point to the latest filter.

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 2 guests