# $\_SERVERplus-signs and whitespace

**URL:** <https://www.ruby-forum.com/t/serverplus-signs-and-whitespace/238006>\
**Category:** NGINX\
**Created:** [December 11, 2013, 11:20am UTC](https://www.ruby-forum.com/t/serverplus-signs-and-whitespace/238006 "2013-12-11T11:20:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [December 11, 2013, 11:20am UTC](https://www.ruby-forum.com/t/serverplus-signs-and-whitespace/238006/1 "2013-12-11T11:20:20Z")

</div>

Hello,  
I have the following Problem with Nginx 1.2.1-2.2  
running on 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86\_64 GNU/Linux

A String like $\_SERVER[‘QUERY\_STRING’] = test=1+2 will get $\_GET[‘test’]  
= 1 2  
I have found the following:

|$\_GET||[||“q”||] = ||strtr||(||$\_GET||[||“q”||], ||“+”||, ||" "||);|  
at  
[http://www.dmuth.org/node/1268/how-get-rid-annoying-plus-signs-drupal-under-nginx](http://www.dmuth.org/node/1268/how-get-rid-annoying-plus-signs-drupal-under-nginx)

Is there a way to do this, in nginx config?

Regards,  
basti

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 11, 2013, 12:56pm UTC](https://www.ruby-forum.com/t/serverplus-signs-and-whitespace/238006/2 "2013-12-11T12:56:44Z")

</div>

‘+’ in url equla ’ ’ (base64). if value has ‘+’, you must encode it.

example:  
$a = “1+1”;  
echo urlencode($a);

the correct url is: “[http://x.com/?test=1%2B1](http://x.com/?test=1%2B1)”

–  
smallfish [http://chenxiaoyu.org](http://chenxiaoyu.org)
