views:

510

answers:

1

Hi,

A little late but I just upgraded from Isapi Rewrite version 2 to version 3.

I'm having problems with rules in the following style:

RewriteRule ^/seo-friendly/(\?(.*))? /test/index.cfm?page=home&$2

Here I want any extra query string parameters passed on to the rewritten URL.

This worked fine under IR2 but fails to pass the extra parameters in IR3. I have both the Regex tester .exe utilities from each version so I tried those.

If I enter /seo-friendly/?hello=world, IR2's regex tester says $1: ?hello=world and $2: hello=world Which is perfect.

But IR3's says $0: /seo-friendly/ and $1 and $2 are blank.

It looks like I can't access query string variables.

I found this flag mentioned in the docs:

O (nOrmalize)

Normalizes string before processing. Normalization includes removing of an URL-encoding, illegal characters, etc. Also, IIS normalization of an URI completely removes query string. So, normalization should not be used if query string is needed

But I haven't set this flag against my rules. Is there a global rule that I can set to stop this (apparent) normalization?

A: 

If ISAPI Rewrite works nearly the same as Apache’s mod_rewrite, you should just need to set the QSA flag:

RewriteRule ^/seo-friendly/$ /test/index.cfm?page=home [QSA]
Gumbo
I can't find any mention of it in their documentation but that flag works like a charm. Thanks a million!
stubotnik