Nginx case insensitive URL and rewrite URL?

grydan nginx-forum at nginx.us
Wed Dec 17 14:15:54 UTC 2014


I have Nginx configured as reverse proxy

 server {
 listen 80;
 server_name   www.pluto.com;
 location / {
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://127.0.0.1:8080;
 }
}
I need that the URL request from any combination of FOLDER1 (case
insensitive) is rewrite from URL

http://www.pippo.com/FOLDER1/etc..etc..etc..
to (always lowercase folder1)

http://12.0.0.1/folder1/etc..etc..etc...
where etc..etc..etc. = anything that I need to keep

How can I do?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,255565,255565#msg-255565



More information about the nginx mailing list