LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   nginx rewrite (https://www.linuxquestions.org/questions/linux-newbie-8/nginx-rewrite-931164/)

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: https://my_shopping_store.com/home/p...aABvAHAAIABvAH

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 ^.*$ https://my-domain.com/home/purchase....VeHjuROylCeMXT permanent;
}

Unfortunately, isn't working.


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