1 message in ru.sysoev.nginxurlencode for rewrite rules
FromSent OnAttachments
Andy TribolettiMar 6, 2007 7:27 pm 
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:urlencode for rewrite rulesActions...
From:Andy Triboletti (andy@public.gmane.org)
Date:Mar 6, 2007 7:27:38 pm
List:ru.sysoev.nginx

Hi, I'm trying to put one url inside another url with a rewrite rule, but I want to make sure the embedded url is url encoded. Is there a way to do this with nginx? I think mod_rewrite does this automatically, but I'm not sure.

rewrite ^(.*)$ /the_real_file?referer=$http_referer redirect;

This makes urls like /the_real_file?referer=http://www.gmail.com?foo=bar

I want the urls to look like: /the_real_file?referer=http%3A%2F%2Fwww.gmail.com%3Ffoo%3Dbar

I can't get the the referer out of the header cause it's a flash movie, so I'm trying to do this trick with appending the referer onto the request as a query param.

Thanks, Andy