How do I replace the domain name in a Apache Rewrite rule?
snippet in htaccess

How do I replace the domain name in a Apache Rewrite rule?

user2323

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteRule ^(.*)$ http://www.thenewdomain.net/$1 [R=301,L]