Create a 301/permanent redirect on Apache

After running my blog for Vote Daily Deals on a sub-domain for some time, some SEO suggestions I've been given is it's better to have your blog as part of the main URL. With the separate sub domain they are treated as two separate URLs in Google's indexing.

So after moving the blog into a sub-directory of votedailydeals.co.nz I need to ensure Google can redirect the existing indexed URL's you need to create an ".htaccess" file to 301 (permanently redirect) to the new address.

For example:

http://blog.votedailydeals.co.nz/welcome-to-vote-daily-deals/

redirect to

http://votedailydeals.co.nz/blog/welcome-to-vote-daily-deals/

Here is a screencast of the ".htaccess" file I created and how to get the existing links indexed by Google.

The syntax to retrieve all the indexed links on Google is:

site:example.com
Tags:
 blog,
 development