title: php / expression engine - redirect all URLs from one URL segment to another URL segment
body: <p>I have an expression engine site that I recently redid and, while the titles of each article or page on the site did not change, the routes to them did. So, for example, where before I had:</p>
  
  <p>site.com/site/code_single/name-of-page</p>
  
  <p>I now have</p>
  
  <p>site.com/main/code-item/name-of-page</p>
  
  <p>How would I set up a redirect (either with expression engine tags or with PHP / .htaccess) so that all URLS matching site/code_single got redirected to their corresponding titles in site/main/code-item?</p>