This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: How to change the value of queryparam
Author
Message |
niket1
Newbie


Joined: 18 October 2011
Posts: 1
Posted: 18 October 2011 at 9:48am

Hi,
I want to have following implemented.
If domainname ends with 'au' then add a query param langid=99. In case of any existing wrong langid query param present then it should be replaced by 99 value.
e.g.
input=>
www.myApp.au
www.myApp.au?param1=value1
www.myApp.au?param1=value1&langid=10

expected ouput=>
www.myApp.au?langid=99
www.myApp.au?param1=value1&langid=99
www.myApp.au?param1=value1&langid=99

I can handle first and second example. How to do address the third one? :| Inputs please.

-Niket

Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 19 October 2011 at 5:41am

Hello Niket,

Try using the following rule:

RewriteCond %{HTTP:Host} ^www\.myApp\.au$
RewriteCond %{QUERY_STRING} !^.*langid=.*$ [NC]
RewriteRule ^$ $0 [QSA,NC,R=301,L]


Regards
Andrew
Back to Top
 

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

Printable version Printable version