# Rewriting GET request parameters while configured as a reverse proxy

**URL:** <https://www.ruby-forum.com/t/rewriting-get-request-parameters-while-configured-as-a-reverse-proxy/238644>\
**Category:** NGINX\
**Created:** [January 21, 2014, 8:08pm UTC](https://www.ruby-forum.com/t/rewriting-get-request-parameters-while-configured-as-a-reverse-proxy/238644 "2014-01-21T20:08:28Z")\
**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:** [January 21, 2014, 8:08pm UTC](https://www.ruby-forum.com/t/rewriting-get-request-parameters-while-configured-as-a-reverse-proxy/238644/1 "2014-01-21T20:08:28Z")

</div>

Hello  
Is there a way to make nginx rewrite the GET request parameters while  
configured as a reverse proxy. e.g. if nginx receives a request GET /  
foo.html?abc=123 , can nginx rewrite it to GET /foo.html?abc=456 (nginx  
admin specifies 123 to be changed to 456) and then do a proxy pass to  
the origin server.  
I did a test run with using $args on the lines of  
if($args~post=140){  
rewrite ^ [http://example.com/](http://example.com/) permanent; }  
as explained at [Module ngx\_http\_rewrite\_module](http://wiki.nginx.org/HttpRewriteModule). However, this  
seems to work only for when nginx is the web server. It tries to fetch  
the content from the local nginx html folder.

Please provide inputs.

---

<div class="post-metadata">

**Author:** ![Rv\_Rv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@Rv\_Rv](https://www.ruby-forum.com/u/Rv_Rv)\
**Post date:** [January 21, 2014, 11:25pm UTC](https://www.ruby-forum.com/t/rewriting-get-request-parameters-while-configured-as-a-reverse-proxy/238644/2 "2014-01-21T23:25:41Z")

</div>

## It seems your syntax is obsolete. Have a look at [Converting rewrite rules](http://nginx.org/en/docs/http/converting_rewrite_rules.html) where it is explicitly written. It is also explicitely wriiten on the wiki page you visited that the resource is obsolete and that you should use [Module ngx\_http\_rewrite\_module](http://nginx.org/en/docs/http/ngx_http_rewrite_module.html).

_B. R._
