Apache URL rewriting can be tricky sometimes (beware spaces!), and I have a nasty habit of forgetting my old tricks.
So here goes:
Make a file available without HTML extension:
RewriteRule ^article$ article.html [nocase]
Redirect to another path:
RewriteRule ^nice-article$ /articles/nice-one [nocase,redirect=permanent,last]
Remember to start the redirect path with a slash!
Redirect users ‘guessing’ an archive URL to the correct URL:
RewriteRule ^(20\d{2})$ /archive/$1 [redirect=permanent,last]
Redirect users to the domain name with www. prefix added:
RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*) http://www.domain.com/$1 [L,R=301]
Remember that you can combine multiple RewriteConds by adding them before the RewriteRule.
And finally, these are the flags shortcuts:
nocase|NC
last|L
ornext|OR
redirect|R =[HTTP redirect status code] or [temp|permanent|seeother]