Move URL with redirects in Nginx
I have a node app running on http://localhost:3000. I set up ssl/https with LetsEncrypt so all requests are 301 redirected to https. Im using Nginx as web server.
I’m trying to move my URL from resume.mydomain.com to mydomain.com/resume.
- How do I forward requests to mydomain.com AND mydomain.com/resume to my node app?
- If users go to mydomain.com AND resume.mydomain.com they should automatically be redirected to mydomain.com/resume.
How do I do this?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.