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
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
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
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
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
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
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
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:
>
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
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
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:
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
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
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:
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
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 '/'
16 matches
Mail list logo