Lowercase URLs

Christoph Schug chris+nginx at schug.net
Tue Aug 28 13:55:39 UTC 2012

On 2012-08-28 11:30, ShreyasPrakash wrote:
> Hi,
> I would like to know how to convert the URLs to lowercase. When 
> somebody
> hits an URL ( irrespective of the case ), it should be converted to
> lowercase in the address bar.

With the help of lua-nginx-module (see 
it could look like this ...

location ~ "\p{Lu}" {
     rewrite_by_lua 'return ngx.redirect(string.lower(ngx.var.uri), 


More information about the nginx mailing list