I'm planning to do a lot of redirects in nginx with mapping files like in the example below, but just discovered that I have to redirect about 57,000 URLs. Is putting them in config files like this the best way to do it, or is there a better way?
map $request_uri $redirect_uri {
/old-path-1 /new-path-1;
/old-path-2 /new-path-2;
/old-path-3 /new-path-3;
}
The redirects are mostly for the search engines. After they re-index the site, I think there won't be a huge number of hits on the old URLs. I'm mainly concerned about potential problems from creating a configuration file that has that many lines in it.
Update: it worked fine.