Eğer doğru anladı isem aşağıdaki çalışacaktır.r

rewriteEngine On
RewriteRule ^$ http://y.com/ [L]
RewriteCond %{HTTP_HOST} ^x.com$
RewriteRule ^(.*)$ http://y.com/$1 [L]