views:

28

answers:

1

In ISAPI_rewrite 3 documentation is this example

RewriteRule ^(.*?\.asp)/([^/]*)/([^/]*)(/.+)? $1$4?$2=$3 [NC,LP,QSA]

http://www.myhost.com/foo.asp/a/A/b/B/c/C
http://www.mysite.com/foo.asp?a=A&b=B&c=C

Since my products can have more or less parameters in query string, this seemed like right approach. Based on given example I tried to create a rule for my case with no luck.

http://www.myhost.com/product-name.aspx/a/A/b/B/c/C
http://www.mysite.com/products.aspx?a=A&b=B&c=C

Thanks for the help

A: 

After more digging I came up with solution. Seems like there is no other way but using two rules.

  RewriteRule ^(.*?\.htm)/([^/]*)/([^/]*)(.+)? $1$4?$2=$3 [NC,LP,QSA]
  RewriteRule ^.*?\.htm$ product.aspx [NC,L]
Leon