ISAPI Rewrite Rules for a newbie

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 2
Joined: 29 Aug 2013, 22:20

ISAPI Rewrite Rules for a newbie

29 Aug 2013, 22:23

Hi,

we just installed the Helicon ISAPI rewrite onto our server. we are running the following.

windows server 2012
Coldfusion 10
IIS 8

We used to use the Ionics Rewrite Utility on our old servers, but have opted to move to this product due to some issues in the past.

Currently we are trying to figure out how to get a rewrite rule to work properly.


RewriteRule ^/login/([^?]+)[?]?(.*)$ /index.cfm?go=login.main&content=$1&$2
RewriteRule ^/login/(.*)$ /index.cfm?go=login.main&content=$1



what we are trying to do is the following.

/login/ & then append any ? query string variables to the url

but each time nothing gets applied to the pages when we dump out the URL variables on the page...

Any ideas greatly appreciated

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: ISAPI Rewrite Rules for a newbie

30 Aug 2013, 20:53

Hello,

First of all, lets try with the basics of ISAPI_Rewrite 3 to make sure we do everything right.

Each file starts with(second line may vary):

Code: Select all
RewriteEngine on
RewriteBase /


The rule should look like:

Code: Select all
RewriteRule ^login/(.+)$   /index.cfm?go=login.main&content=$1 [QSA,NC,L]


This rule should replace the two rules you were using. The ideas here is that QSA-flag automatically appends a querystring using &, if needed. Also, please, make sure you've checked our:
FAQ - http://www.helicontech.com/forum/10648-FAQ.html
Article #1 - http://www.helicontech.com/articles/exp ... te-part-i/
Article #2 - http://www.helicontech.com/articles/exp ... te-part-2/
.. this will give you some insight. In this particular case, for example, querystring wouldn't even be in matched in the rule. Querystring is carried by a condition like "RewriteCond %{QUERY_STRING} ^somethng=else$ [NC]"

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 19 guests