Generate redirects for directories.