-   Linux - Newbie (
-   -   nginx rewrite (

mad_penguin 02-25-2012 12:53 AM

nginx rewrite
Hi Gents,

I need someone good with Nginx. I have some Nginx experience but unfortunately I can't solve this problem by myself.

Basically I need this url:

to be redirected to the same url and just append this string "&promocode=U01Ng1dlzqVeHjuROylCeMXT" to it's tail.

This is trycky as "rs", "cid" and "lid" values are changing, only "afl" and "pid" remain the same.

I've tried this:

if ($request_uri ~* ".*/home/purchase.php\?afl=1659\&rs=[0-9]\&pid=9\&cid=([0-9][a-z])\&lid=([0-9][a-z]$") {
set $args "";
rewrite ^.*$ permanent;

Unfortunately, isn't working.

All times are GMT -5. The time now is 10:33 AM.