too many redirects - nginx and middleware #760
Unanswered
OfficialMindAI
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i am trying to redirect whoever is visiting my website to default redirecting to the https version of it ( for SEO purposes ). What actually happens is that using the middleware with next-intl it already redirects the users to the default locale the first time so for example when a user visits the / path it will be redirected to the /en path, by adding the following code in my nginx file it is supposed to redirect the user to the https version. Unfortunately it raises "too many redirects". Any idea on how can i bypass this issue?
Here's my code of my nginx file:
if ($host = officialmindai.com) { return 301 https://$host$request_uri; }
Beta Was this translation helpful? Give feedback.
All reactions