Redirect a path or folder to a new domain in htaccess with 301

How to redirect a complete folder or path to a new site using .htaccess and code 301. 301 means "Moved Permanently" and you should use it if that is the case. In my case I had by misstake let Google index 17.000 urls and I needed a quick way to redirect to the new site but keep the articles path, so I did this:

RedirectMatch 301 ^/feedhandler/news/(.+)$ http://www.my-site.se/news/$1
</code

<p>This will have the following affect:
<code>
http://my-old-site.se/feedhandler/news/some-good-article
http://www.my-s...

Source: http://www.seo-guide.se/301-redirect

Knowledge keywords: