Welcome! Log In Create A New Profile

Advanced

Re: Trailing Slash Redirect Loop Help

Francis Daly
October 15, 2019 10:36AM
On Mon, Oct 14, 2019 at 11:06:02PM -0400, Alex Med wrote:

Hi there,

> 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.

Correct. More specifically: there is not much nginx can do about removing
slashes based on whether the uri corresponds to a file or directory on
a server that nginx cannot read.

> Is there a way to tell nginx that if it gets a "/" from the upstream to
> leave it the way it is?

I don't understand the question.

nginx will usually leave things the way they are, unless configured
otherwise. (Aside: some default configuration options are "do change
things".)

If it still matters, can you describe a timeline of what you would like
to have happen?

Something like:

* client requests /thing/
* nginx (does something, perhaps involving the filesystem or a
proxy_pass)?
* nginx responds http 301 to /thing, or responds 200 with some content. Or
maybe responds http 301 to /thing/index?

but include all the words at step 2 that will make it very clear what
your desired end result is.

> I guess I will give up the idea of having all urls
> without a trailing slash.

You can do "no trailing slash" if you want to; but you will have to
configure all of your web servers to do what you want them to when they
get a "trailing slash" url.

I don't think that I know what you want them to do when they get a
"trailing slash" url.

Good luck with it,

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

Trailing Slash Redirect Loop Help

Alex Med April 28, 2017 10:27AM

Re: Trailing Slash Redirect Loop Help

steveh April 28, 2017 10:42AM

Re: Trailing Slash Redirect Loop Help

Alex Med April 28, 2017 10:48AM

Re: Trailing Slash Redirect Loop Help

steveh April 28, 2017 11:36AM

Re: Trailing Slash Redirect Loop Help

Alex Med April 28, 2017 11:43AM

Re: Trailing Slash Redirect Loop Help

steveh April 28, 2017 11:48AM

Re: Trailing Slash Redirect Loop Help

Alex Med April 28, 2017 12:52PM

Re: Trailing Slash Redirect Loop Help

steveh May 01, 2017 06:42PM

Re: Trailing Slash Redirect Loop Help

Alex Med May 10, 2017 10:43AM

Re: Trailing Slash Redirect Loop Help

Francis Daly April 29, 2017 08:36AM

Re: Trailing Slash Redirect Loop Help

Alex Med May 10, 2017 11:10AM

Re: Trailing Slash Redirect Loop Help

Francis Daly May 12, 2017 05:26PM

Re: Trailing Slash Redirect Loop Help

Alex Med October 06, 2019 12:24PM

Re: Trailing Slash Redirect Loop Help

Francis Daly October 08, 2019 06:48PM

Re: Trailing Slash Redirect Loop Help

Alex Med October 09, 2019 11:22AM

Re: Trailing Slash Redirect Loop Help

Francis Daly October 09, 2019 05:34PM

Re: Trailing Slash Redirect Loop Help

Alex Med October 14, 2019 11:04PM

Re: Trailing Slash Redirect Loop Help

Alex Med October 14, 2019 11:06PM

Re: Trailing Slash Redirect Loop Help

Francis Daly October 15, 2019 10:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 285
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