This example outlines the process of redirecting all website pages on a website (or all pages in a specific website folder) to a new domain or new folder on the same domain.
Note this code will redirect all files to the homepage also known as the root page of the destination. If you are moving a website to a new location and want all of the files to redirect to the same unique page on the new domain, then you’ll want to utilize a “wildcard redirect” instead.
Warning! You should not modify your .htaccess file unless you know what you are doing. For assistance with the process, contact your web host or contact me for assistance.
HTACCESS Command for Redirecting a website or subfolder to a new domain
Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/ [R=301,L]