Re: Trailing Slash Redirect Loop Help

2019-10-14 Thread Alex Med
Dear Francis: What I am perceiving from your answers is that if nginx can not know with (!-d or the try_files) that the uri is a directory or a file, there is not much it can do about not removing slashes from the uris it gets. Is there a way to tell nginx that if it gets a "/" from the upstream

Re: Trailing Slash Redirect Loop Help

2019-10-14 Thread Alex Med
Dear Francis: What I am perceiving from your answers is that if nginx can not know with (!-d or the try_files) that the uri is a directory or a file. Is there a way to tell nginx that if it gets a "/" from the upstream to leave it the way it is? I guess I will give up the idea of having all ur

Re: Trailing Slash Redirect Loop Help

2019-10-09 Thread Alex Med
Dear Francis: Thank you for your answers. Here is the full configuration with reverse proxy, pagespeed,and lowercasing. It all works well, but now that I incorporated removing the trailing slash it brought up new issues: https://pastebin.com/keQ239D4. Let me know if you prefer that I post the co

Re: Trailing Slash Redirect Loop Help

2019-10-06 Thread Alex Med
Dear Francis: After so many years, I am back to the same questions I had many years ago, but never resolved on Nginx. So perhaps, it is time to change this and find a useful implementation. So, now what I want is to get rid off the trailing slashes for anything that is not a directory or a folde

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

2019-10-05 Thread Alex Med
Francis, I apologized. I wrote your name incorrectly in my previous message. I am not able to edit it. So, THANK YOU, FRANCIS! Alex Posted at Nginx Forum: https://forum.nginx.org/read.php?2,285780,285800#msg-285800 ___ nginx mailing list nginx@n

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

2019-10-05 Thread Alex Med
Dear David: I am very grateful for your help! Below is the final configuration working optimally. I even included the proxy configuration parameters for the websocket connection to work.I noticed that the location =/ does not support OR so I had create two additional locations to catch paths w

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

2019-10-04 Thread Alex Med
Dear Francis: Thank you again for your help! I apologize. Perhaps, I should have started with what I want to accomplish with the configuration. I want the server to lowercased every URI except the ones that begins with any of the following paths: /api/ /contentAsset/ /categoriesServlet/ /DotA

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

2019-10-03 Thread Alex Med
I also would like to add that when I access: example.com/API/ it is lowercased to example.com/api/. According to my configuration it should not. So it means location #1 is not working properly. Alex Med Wrote: --- > Dear Francis: >

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

2019-10-03 Thread Alex Med
Dear Francis: Here are the answers to your questions. Thank YOU for helping! The location block are in the following order: Location #1 location ~ ^/(api|contentAsset|categoriesServlet|DotAjaxDirector|html|dwr|dA)/ {} Location #2 > This location does the lowercasing location ~ [A-Z] { retu

Nginx Reverse Proxy Lowercase URL and some exceptions to the URL

2019-10-03 Thread Alex Med
I have the following server configuration. I have two problems that I would appreciate if someone can tell me what I am doing wrong: 1- this location is not respected since the configuration lowercases all uris without respecting these locations. Please note that api, contentAssets, categoryServ

Re: Trailing Slash Redirect Loop Help

2017-05-10 Thread Alex Med
Francis - Yes, I am realizing that is a nightmare going against the trailing-slashed directory nature. So I am going to have this rule take off slashes from anything but directories. Do you have any suggestions as how to do it, but without "if" Thank you so much! Alex Posted at Nginx Forum:

Re: Trailing Slash Redirect Loop Help

2017-05-10 Thread Alex Med
Steve - You are right something else is adding a trailling slash to directories. Is there a way to configure nginx to remove trailing slashes from everything except from directories? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,273964,274132#msg-274132

Re: Trailing Slash Redirect Loop Help

2017-04-28 Thread Alex Med
Steven - I implemented your suggestion and I still get the same problem with the directories ... for anything else it works. But when I try to access a directory ... I can see on the browser address bar the / appearing and disappearing and then it finally does but the browser gives this error: To

Re: Trailing Slash Redirect Loop Help

2017-04-28 Thread Alex Med
Steve - Thank you so much this has brought so much clarity! I appreciate the time you spend writing the reply. So the rewrite ^/(.*)/$ /$1 permanent; needs to be outside of the location definition and inside the server definition, correct? Infinite thanks! Alex Posted at Nginx Forum: https:

Re: Trailing Slash Redirect Loop Help

2017-04-28 Thread Alex Med
Steveh: Thank you for your reply. So what you are suggesting me to do is something like this: location / { try_files $uri $uri/ @rewrite; } location @rewrite { rewrite ^/(.*)/$ /$1 permanent; } Put try files inside the location block and create a new block with the rewrite? Thank you

Trailing Slash Redirect Loop Help

2017-04-28 Thread Alex Med
Hi, I am having an issue getting rid of the trailing slashes for directories. I have used the following to get rid off the trailing slash: #rewrite all URIs without any '.' in them that end with a '/' #rewrite ^([^.]*)/$ $1 permanent; & #rewrite all URIs that end with a '/'