1

I'm going to move from old domain to new domain. I fixed all the settings, but none worked. While entering the old domain name in the url, I will encounter the message of not redirecting to the new domain.

2
  • 1
    You seem to have a redirection loop. https://motocode.ir/ is redirecting to itself. Nov 11, 2021 at 10:37
  • 1
    Can you please provide some more specific information? Nov 13, 2021 at 3:27

1 Answer 1

2

Something like this in your server block should work:

...
server_name old.example;
return 301 $scheme://new.example$request_uri;
...
1
  • 1
    Thanks dear Friends. The problem has been resolved. Thank you Nov 13, 2021 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.