ISAPI Rewrite Rules for a newbie
2 posts
• Page 1 of 1
ISAPI Rewrite Rules for a newbie
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
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
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: ISAPI Rewrite Rules for a newbie
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):
The rule should look like:
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
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
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 19 guests