Redirect directory and contents using htaccess

How to redirect an entire directory and all internal files using the htaccess file.

In the example below the site moved from a standard static page website to a site powered by WordPress, and thus moved its images directory as shown below:

http://www.example.com/images/

http://www.example.com/wp-content/uploads/

(note: In WordPress, change your media settings by un-checking this box “Organize my uploads into month- and year-based folders”. This will keep all your uploads in a single folder.)

RewriteEngine On
RewriteRule ^images/(.*)$ http://www.example.com/wp-content/uploads/$1 [L]