How can I redirect and rewrite my URLs with an .htaccess file?

Redirect all urls to new site’s similar urls

The following code to redirects all URLs on your site to the given url.

Redirect 301 / https://example.com