Problem re-writing using query strings

Hi,

I’m basically trying to do this:

rewrite /x.php?a=1 to /x.php?b=2.

So, I have

location /x.php {
set $args ‘b=2’;
rewrite ^ /x.php
}

This produces a loop.

How can I basically do this? Re-write from same URL to same URL with
different query strings?

Posted at Nginx Forum: