Possible rewrite regular expression bug?

Peter Hoang lists at ruby-forum.com
Wed Jun 25 05:09:29 MSD 2008


Hi Igor,

I have a search form on the site and sometimes people do searches for 
"C++". When they submit the form, the URL will be 
http://localhost/search?q=C%2B%2B because the browser will encode the 
term "C++". Since we want to make it search engine friendly, we redirect 
user to http://localhost/search/q-C%2B%2B.html, hence my question.

Any suggestion?

Cheers,

Cuong

Igor Sysoev wrote:
> On Tue, Jun 24, 2008 at 06:03:51PM +0200, Peter Hoang wrote:
> 
>> url would be http://localhost/cms/q-%2B%2B.html. Is there a way to 
>> prevent this from happening? Thanks.
> 
> It had been implemented long ago in 0.3.10:
> 
>     *) Bugfix: the "rewrite" directive did not unescape URI part in
>        redirect, now it is unescaped except the %00-%25 and %7F-%FF
>        characters.
> 
> Why do you need "c%2B%2B" in URL ? "c++" is valid unambiguous URL part.

-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list