Redirect wildcards to a single root directory

When you want to redirect a bunch of possibilities to one path and you want that path to return the default file (index.php, index.html ...) but for SEO reasons you just want to point to the root of the directory, not the default file, use something like this in .htaccess

# Redirects any request to directory
RedirectMatch 301 ^/.*$

# Redirects any request for /foo/* to directory
RedirectMatch 301 ^foo/.*$