spaces in URI

Igor Sysoev igor at sysoev.ru
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 xxx.xxx.xxx;
> 
> It seems to be allowing www.xxxx.xxx/uS/ to work.  Not sure if there
> will be any pitfalls later...

Then

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


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list