-
Notifications
You must be signed in to change notification settings - Fork 365
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
External redirects don't work without 200 status #3770
Comments
@lukasholzer I was trying to debug this issue. This is the place where redirects are handled: Lines 216 to 227 in 47bf5eb
The Lines 79 to 81 in 47bf5eb
Switching the order of |
@tinfoil-knight do you want to continue and take over on this issue? |
Sure. |
* test: add failing test to reproduce issue with 301 redirects * fix: external redirects not being matched correctly Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Describe the bug:
A user reported on the forums that they were not able to get the external redirects to work with Netlify CLI. The redirect syntax is valid.
Upon further investigation, it looks like CLI is adding the redirect correctly, but the
location
header is incorrect. For example, with the following_redirects
file:I see this:
It's basically redirecting it back to the home page.
To reproduce:
_redirects
file as mentioned above and anindex.html
in a working directory. It can be simple as:netlify dev
.dev-url/foo
.Configuration:
Expected behaviour:
It should redirect to the required URL.
CLI Output
If applicable, add the CLI output to help explain your problem.
Additional context
This seems to work fine with the
200!
configuration.The text was updated successfully, but these errors were encountered: