Rewrite broken with + in string

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 24 May 2012, 17:59

Rewrite broken with + in string

24 May 2012, 18:08

I'm trying to rewrite a url like:
https://www.mydomain.com/light-bulb/AIR ... TIZER-AH-1
to a target like:
https://www.mydomain.com/moreinfo.int?i ... TIZER-AH-1

My rewrite code is:
Code: Select all
#redirects moreinfo.int requests to light-bulb format
RewriteCond %{HTTPS} on
RewriteCond %{QUERY_STRING} ^itemno=(.+)$ [NC]
RewriteRule ^moreinfo\.int$ light-bulb/%1? [NC,R=301]


This works in most cases but any link with the + in the querystring is screwing things up. Ideas?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Rewrite broken with + in string

25 May 2012, 06:04

Hello,

Here's an article, that will help you to overcome this issue: Titbits: Plus sign in IIS7

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 5 guests