Welcome! Log In Create A New Profile

Advanced

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Francis Daly
October 03, 2019 01:38PM
On Thu, Oct 03, 2019 at 12:21:29PM -0400, Alex Med wrote:

Hi there,

> Location #1
> location ~
> ^/(api|contentAsset|categoriesServlet|DotAjaxDirector|html|dwr|dA)/ {}
>
> Location #2 ----> This location does the lowercasing
> location ~ [A-Z] { return 301 $scheme://$host$my_uri_to_lowercase;}
>
> Location #3
> location /{}
>
> Everything is lowercased. So I want some paths to be untouched. So I
> created location #1 to exclude some paths from lowercasing. The problem is
> that
> in some URLs containing the paths above are lowercased. For example:
> /dwr/interface/CategoryAjax.js, /dwr/interface/HostAjax.js are lowercased.
> Also, /html/images/languages/gh_TW.gif

If I make my server{} have three location{}s:

==
location ~ ^/(api|contentAsset|categoriesServlet|DotAjaxDirector|html|dwr|dA)/ {
return 200 "In the first location, uri $uri\n";
}

location ~ [A-Z] { return 200 "In the A-Z location, uri $uri\n"; }

location / { return 200 "In the / location, uri $uri\n"; }
==

then the requests for /dwr/interface/CategoryAjax.js,
/dwr/interface/HostAjax.js, and /html/images/languages/gh_TW.gif are
served from the first location, not the second.

So - I'm not seeing what you are reporting.

When you do a "curl -i" for /dwr/interface/CategoryAjax.js, what response
do you get?

HTTP 200, HTTP 301, something else?

Thanks,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Alex Med October 03, 2019 11:36AM

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Francis Daly October 03, 2019 11:56AM

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Alex Med October 03, 2019 12:21PM

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Alex Med October 03, 2019 01:03PM

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Francis Daly October 03, 2019 01:38PM

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Francis Daly October 03, 2019 03:06PM

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Alex Med October 04, 2019 03:36PM

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Francis Daly October 04, 2019 04:52PM

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Alex Med October 05, 2019 12:41PM

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Alex Med October 05, 2019 12:50PM

Re: Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

Francis Daly October 06, 2019 07:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 241
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready