%QUERY_STRING pattern not-matched no idea why

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 4
Joined: 03 Oct 2013, 11:38

%QUERY_STRING pattern not-matched no idea why

03 Oct 2013, 11:46

I am new to url rewriting, and I'm sure there is a lot to learn, but this one seems simple and is just baffling to me.

I have the following rules...

RewriteCond %(QUERY_STRING) itemnbr=376
RewriteRule ^/shopcart/oneitem\.asp?$ http\://xpress.nationalticket.com/xpress [NC,R=301,L]

The Rewrite.log file is saying...
(3) applying pattern '^/shopcart/oneitem\.asp?$ to uri '/shopcart/oneitem.asp'
(4) RewriteCond: input='%QUERY_STRING' pattern='itemnbr=376' => not-matched

The request header is a GET /shopcart/oneitem.asp?itemnbr=376

What am I missing here?

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: %QUERY_STRING pattern not-matched no idea why

03 Oct 2013, 12:03

There should be {} instead of ():

RewriteCond %{QUERY_STRING} itemnbr=376 [NC]
RewriteRule ^/shopcart/oneitem\.asp$ http\://xpress.nationalticket.com/xpress [NC,R=301,L]

User avatar
Posts: 4
Joined: 03 Oct 2013, 11:38

Re: %QUERY_STRING pattern not-matched no idea why

03 Oct 2013, 12:31

Amazing... totally overlooked that. Surely won't happen again!

Thank you! :)

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 25 guests