atom feed7 messages in ru.sysoev.nginxRe: Rewrite assistance needed
FromSent OnAttachments
John StykesMay 4, 2009 8:58 pm 
Igor SysoevMay 4, 2009 10:11 pm 
John StykesMay 4, 2009 10:52 pm 
Igor SysoevMay 4, 2009 11:23 pm 
Payam ChychiMay 4, 2009 11:38 pm 
Igor SysoevMay 4, 2009 11:41 pm 
Marcus ClyneMay 4, 2009 11:53 pm 
Subject:Re: Rewrite assistance needed
From:Igor Sysoev (is@rambler-co.ru)
Date:May 4, 2009 10:11:08 pm
List:ru.sysoev.nginx

On Tue, May 05, 2009 at 05:59:14AM +0200, John Stykes wrote:

Hi, im hoping i can get some insight into why the following rewrite rules are not working (or if I am missing the boat alltogether in using rewrites at all for this problem).

I am currently using nginx to support a backend website to serve static files. In most cases everything is fine with the urls that come in the format of:

/clientfiles/foldera/somecategory/somefile.doc

the problem however occurs when 2 specific requests come to the server with the following requests:

/clientfiles/General%20Business/somecategory/somefile.doc and /clientfiles/Insurance%20&%20Finance/somecategory/somefile.doc

typically all the requests are mapped to a specific folder like so:

/clientfiles/Support/somecategory/somefile.doc would be mapped to /var/www/data/clientfiles/Support/somecategory/somefile.doc

but the 2 specific urls above are problematic because of the spaces (in both) and the ampersand (in one).

i've tried endless rewrite rules to make the 2 examples above point to a different directory on the filesystem but nginx cannot find the file and i get 404 errors. Filesystem is linux.

I have tried using a directory with spaces escaped with \ - no luck

If these files are served by nginx without backend participation, the you need just

location /clientfiles { root /var/www/data; }