Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding trailing slash causes an unnecessary 307 internal redirect #22

Open
peimansh opened this issue Dec 17, 2019 · 0 comments
Open

Adding trailing slash causes an unnecessary 307 internal redirect #22

peimansh opened this issue Dec 17, 2019 · 0 comments

Comments

@peimansh
Copy link

I have found an issue where Nginx tries to add trailing slash to the URIs, then there happens double redirect. The default redirect for adding trailing slash does the redirect in HTTP protocol and then does another redirect to HTTPS which causes an extra unnecessary "internal redirect 307" status in the process.

For example:
https://somedomain.com/some-article --> http://somedomain.com/some-article/ -301 moved permanently
http://somedomain.com/some-article/ --> https://somedomain.com/some-article/ -307 internal redirect
https://somedomain.com/some-article/ --> 200 status OK

I'm not expert in Nginx configurations so I'm wondering if this could be solved by some code tweak or this is a code bug and should be patched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant