Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-25-2012, 01:53 AM   #1
Registered: Mar 2008
Posts: 69

Rep: Reputation: 15
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Using a Rewrite in Nginx for feedburner LXer Syndicated Linux News 0 06-17-2011 12:40 PM
nginx rewrite / redirect LMW Linux - Server 4 05-14-2011 12:37 PM
Nginx Virtual Hosts & Wordpress Rewrite Rules Coburn64 Linux - Server 1 09-15-2010 02:58 PM
Problem with dynamic url rewrite and redirect in nginx??? gavin2u Linux - Server 3 05-27-2010 11:25 PM
nginx 0.7.65 rewrite url with querystring problem? gavin2u Linux - Server 0 04-07-2010 08:46 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration