redirecting an entire WP site from one top level domain to another

No, you’d want a rewrite rule that captures & redirects the request:

RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

error code: 523