4 messages in ru.sysoev.nginxSearch and replace query string
FromSent OnAttachments
Chuck VoseJul 26, 2007 3:22 pm 
Chuck VoseAug 6, 2007 12:11 pm 
Igor SysoevAug 6, 2007 1:40 pm 
Chuck VoseAug 7, 2007 10:31 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Search and replace query stringActions...
From:Chuck Vose (vose@public.gmane.org)
Date:Jul 26, 2007 3:22:38 pm
List:ru.sysoev.nginx

I've been pounding against this for a little while and it's time to ask for help. I'm not sure if it's possible since google has found no similar stories but I can hope.

We're trying to take a query string and replace the ?, &, and = with /. We're going to try to do caching on disk this way. Naturally I would appreciate advice about whether this is a good idea or not but that's not the soul of this question.

Here's the code I've tried to create.

if ($query_string ~ ^(s!(\?|&|=)(?:)!/!g)$) { set $new_url $1; rewrite ^(.*)$ $new_url.html break; }