Welcome! Log In Create A New Profile

Advanced

apmersand in rewrite rule is escaped if url encoded value exists

May 24, 2012 07:29AM
I want to transfer /script/action/var1___val1/var2___val2/.../varN___valN/ to /script/action?var1=val1&var2=val2&...&varN=valN. My rewrite rules are:

rewrite ^/script/(.*)/(\w+)___([^/]+)/(.*)$ /script/$1/$2=$3&$4? last;
rewrite ^/script/(\w+)/(.+) /script/$1?$2 break;

If value of val1/val2/.../valN is alphabets or digits, the rules works fine. Once url encoded value appears, the apmersands connecting variable-value pairs are escaped to '%26' which makes it sucks.

Can somebody help me?

Thanks, Kenny.
Subject Author Posted

apmersand in rewrite rule is escaped if url encoded value exists

kennylanse May 24, 2012 07:29AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 164
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 466 on July 09, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready