Path Rewriting and changes to Path Auto

Quick note: On a site I worked on recently I made a change to the Pathauto settings and needed to create a load of Redirects for previous URLs. Fortunately there is a quick way to do this using wildcards in the htaccess.

Pathauto was set up to make the default node urls something like:

content/[url-raw]

I changed this to simply [url-raw] as I saw no reason to have "content" in every URL.

But of course this means any links or SERP indexing to existing content is then broken and will get 404 penalties.
You can use the Path rewrite module to handle this for you and it will create rewrites for all of the changed URLs - but a better solution is to rewite the old urls in the .htaccess as

RewriteRule ^content/(.*)$ /$1 [R=301,L,QSA]

That saves a load of work and keeps the rewrite list short!