Rewrite broken with + in string
2 posts
• Page 1 of 1
Rewrite broken with + in string
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:
This works in most cases but any link with the + in the querystring is screwing things up. Ideas?
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?
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Rewrite broken with + in string
Hello,
Here's an article, that will help you to overcome this issue: Titbits: Plus sign in IIS7
Regards
Andrew
Here's an article, that will help you to overcome this issue: Titbits: Plus sign in IIS7
Regards
Andrew
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 28 guests