I have about 250 URLS that need to be redirected from an old site to new. In the server block I set this statement:
include /etc/nginx/301s/somesite.conf;
Then in the included file I have a list of the urls (shown are four of them):
location = /programs-services/ { return 301 https://www.somesite.com/ }
location = /meeting-planner/ { return 301 https://www.somesite.com/speaker-kit/ }
location = /media/ { return 301 https://www.somesite.com/ }
location = /research-fund/ { return 301 https://www.somesite.com/about/ }
However, Nginx won't restart and complains:
unexpected "}" at the end of the first line.
Is there a better / correct way to implement this?