Jestep's answer above redirects "/root-directory" but fails to redirect "/root-directory/". This can be fixed and simplified by simply:
RewriteCond %{REQUEST_URI} ^/folder/?$
RewriteRule (.*) /newfolder [R=301,L]
This will redirect "/folder" and "/folder/" but leave all sub-directories alone.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…