I was looking at using just the redirect directive, but at the request URIs have slashes in them (eg /dir1/dir2/mypage.html), it doesn't work.
That wouldn't prevent a Redirect (by that name) from working. You just need to know that mod_rewrite and mod_alias behave differently, although they can both issue the identical 301. In what follows, don't quote me on the leading and trailing slashes, I'm just illustrating the point.
Redirect 301 /dir1/dir2/ http://www.example.com/dir3/
vs.
RewriteRule /dir1/dir2/ http://www.example.com/dir3/ [R=301,L]
If you request
http://www.example.com/dir1/dir2/dir4/foobar.html
the first Rule (using mod_alias) will send you to
http://www.example.com/dir3/dir4/foobar.html
because it reappends the part of the path that isn't spelled out in the Rule.
The second Rule (using mod_rewrite) will send you to
http://www.example.com/dir3/
(that is, /dir3/index.html or equivalent)
because anything that isn't spelled out in the target is simply thrown away.
To redirect to the specific page
http://www.example.com/dir3/dir4/foobar.html
using mod_rewrite, you would need to say either
RewriteRule ^dir1/dir2/dir4/foobar\.html http://www.example.com/dir3/dir4/foobar.html [R=301,L]
or
RewriteRule ^dir1/dir2/(dir4/foobar\.html) http://www.example.com/dir3/$1 [R=301,L]
But wait! If you've got two pages living side by side in the same directory, and their new addresses will also be side by side:
RedirectMatch 301 /dir1/dir2/dir4/(foobar|zoetrope)\.html http://www.example.com/dir3/dir4/$1.html
or even
RedirectMatch 301 /dir1/dir2(/dir4/(foobar|zoetrope)\.html) http://www.example.com/dir3$1
or
RewriteRule /dir1/dir2/dir4/(foobar|zoetrope)\.html http://www.example.com/dir3/dir4/$1.html [R=301,L]
or even
RewriteRule /dir1/dir2(/dir4/(foobar|zoetrope)\.html) http://www.example.com/dir3$1 [R=301,L]
Congratulations. You've just constructed a Regular Expression. Wasn't that painless?
If none of your Redirects have any conditions,
and you don't have any existing RewriteRules, you can use mod_alias (Redirect by that name). In fact, Apache wants you to. But if you have-- or ever expect to have-- even a single RewriteRule, convert all your Redirects to RewriteRules with the [R=301] flag.