unescaping character in url

Fr Tr lists at ruby-forum.com
Sat Oct 24 18:46:07 MSD 2009

Hi all,

I have a problem trying to rewrite a URL.

It should be pretty straightforward but it has been taking me hours

Google indexed urls containing ";", which gets escaped to %3B:

(the original url that works is

First approach was:
server {

location /plan/ {
  rewrite /plan/(.*)%3Bjsessionid=[A-Za-z0-9]+(.*)
http://www.server.com/plan/$1$2 permanent;

but no dice, I get errors because it tries to fetch a file from disk (!)
/usr/local/nginx/html/plan/52" failed (2: No such file or directory),

Just to test I tried also with

if ($args ^~ jsessionid){
  rewrite ^ http://example.com/ permanent;

...but it doesn't like the ^~ which btw means the wiki for
NginxHttpRewriteModule is outdated for 0.6.29.

My question is: how can I simply do a rewrite to replace "%3B" to ";" ?


Posted via http://www.ruby-forum.com/.

More information about the nginx mailing list