This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: rewrite condition question
Message |

Joined: 08 October 2010
Posts: 3
Posted: 08 October 2010 at 10:19am


I am trying to write a rewrite condition that basically looks to see if a stateCode included as query string parameter belongs to a pre-determined list of state codes. If it is one of the state codes in the list then, it redirects to a different url and passes the state code as a query string to this new url.

Here is an example:

pre-determined state code list: AL, CA, NY, PA, MO

Scenario 1:

Incoming URL:

New URL:

Scenrarion 2:

Incoming URL:

New URL:  no rewriting required in this case since the state code isnt there in the list.

I really appreciate any help with this regards.

Back to Top
Admin Group

Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 11 October 2010 at 7:10am

The config should look like this:

RewriteCond Host: www\.mysite\.com
RewriteRule /dosomthing\?stateCode=(AL|CA|NY|PA|MO) http\://\?stateCode=$1 [I,RP]

Back to Top

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum