Aggreed. But that is a simple redirect 301 rule.

I want conditional rule in .htaccess file. I have a website with two different domains. but I want visitors to see domain1.com in address bar even if he types with domain2.com.