URL IIS URL with multiple query strings

I'm really new to rewriting urls and trying to rewrite / redirect multiple requests, but it doesn't seem to work. Since this is a search result and runs with different filtering, the queries may differ. For example, in some searches we may have the query t1=something , and in another - t2=somethingelse , and sometimes we can combine them as: t1=something&t2=somethingelse

Im using IIS7 with web.config, and here is what I have done so far:
This is my example link

 www.website.com/search/?t1=first&t2=second 

I tried the following, and not one of them actually worked:
(one)

 <rewrite> <rules> <rule name="first" stopProcessing="true"> <match url="search/" /> <conditions trackAllCaptures="true"> <add input="{QUERY_STRING}" pattern="t1=([0-9a-zA-Z]+)" /> </conditions> <action type="Redirect" url="search/{C:1}/" appendQueryString="false" /> </rule> <rule name="second" stopProcessing="true"> <match url="search/" /> <conditions trackAllCaptures="true"> <add input="{QUERY_STRING}" pattern="t2=([0-9a-zA-Z]+)" /> </conditions> <action type="Redirect" url="search/{C:1}/" appendQueryString="false" /> </rule> </rules> </rewrite> 

(2)

 <rule name="a" stopProcessing="true"> <match url="search2/" /> <conditions trackAllCaptures="true"> <add input="{QUERY_STRING}" pattern="t1=([0-9a-zA-Z]+)" /> <add input="{QUERY_STRING}" pattern="t2=([0-9a-zA-Z]+)" /> </conditions> <action type="Redirect" url="search2/{C:1}/{C:2}" appendQueryString="false" /> </rule> 

I would really appreciate any help.

Thanks.

+8
url-rewriting iis-7 url-rewrite-module
source share

No one has answered this question yet.

See related questions:

2170
How to change the url without reloading the page?
56
URL Correction IIS URL (R: N)
5
IRI7 Url Rewrite - Is it possible to use stopProcessing = "false" with a redirect rule?
3
Simple Slash Reset URL
3
IIS URL Rewrite, Conditional URL Change
0
URL Rewriting (IIS) - How to submit a URL pattern in a match tag
0
IIS URL redirects to same page with different query string
0
URL Overwrite backlink. URL action not working
0
Configure URL Redirection in IIS 7

All Articles