Redirect an entire directory to another location. If you are restructuring an existing website. then for SEO purposes it is important that this type of redirect be Permanent (301).

To redirect an entire directory to a new base location, add the following rule to .htaccess:

RedirectMatch 301 /blog(.*) https://www.example.com/$1

This would cause all requests to content within the /blog directory to be redirected to content of the same name in the root of the website.