Being a bit of a newbie to NginX redirects and not particularly ninja with my regex, could someone please provide some points for how to do the following 301 redirects in a sane way.
(apologies for awful example names)
website.com/what -> website.com/en/what
website.com/team -> website.com/en/team
website.com/stuff -> website.com/en/newstuff
website.com/stuff/this -> website.com/en/newstuff/foo/bar
website.com/stuff/that -> website.com/en/newstuff/thing/page
While i would love for someone to give me the exact answer - I'll settle for some good pointers or examples of roughly what i need to be doing or the sort of direction i should take.
If it helps I'm running nginx 0.8x on Ubuntu 11 and site itself is written in CodeIgniter,
Cleanest way is to use a map block.
This should be the basic idea: