spaces in URI

Igor Sysoev igor at
Tue Sep 28 22:17:45 MSD 2010

On Tue, Sep 28, 2010 at 02:14:09PM -0400, cgarver wrote:

> As I have other countries like Canada to deal with, it can get rather
> unwieldy doing every permutation of case.  What about something like
> this:
> rewrite (?i)^/us(.*)$ /us$1;
> location ^~ /us {
>     proxy_pass       http://backendcms/;
>     proxy_set_header Host;
> It seems to be allowing to work.  Not sure if there
> will be any pitfalls later...


 rewrite (?i)^/us(.*)$ /us$1 last;
 rewrite (?i)^/ca(.*)$ /ca$1 last;

Igor Sysoev

More information about the nginx mailing list