It's possible will be able to configure RewriteRule for additional the other domain.

Like my requirement is My current domain title www.maindomain.com and let say i've three domian and subdomain the subdomain url is example1.maindomain.com example2.maindomain.com example3.maindomain.com

Now i would like whenever user attempt to access www.example1.com it will obtain the content of example1.maindomain.com and also the same for example2, example3

I'm using apache + passenger.

Thank you for help.

First, write a disorder that matches all of the domains you need to redirect. While using matched up area of the domain, write a guide that rewrites towards the target subdomain Web addresses. So, because of the preferred mapping mentioned inside your question, something similar to the next should have the desired effect:

RewriteCond %{HTTP_HOST} ^www\.(example[123])\.com$ [NC]
RewriteRule ^(.*) http://%1.maindomain.com/$1 [L,R]

The above mentioned rewrites from e.g. www.example1.com to example1.maindomain.com. Similarly, if you want it the opposite way round:

RewriteCond %{HTTP_HOST} ^(example[123])\.maindomain\.com$ [NC]
RewriteRule ^(.*) http://www.%1.com/$1 [L,R]

This could rewrite e.g. example2.maindomain.com to www.example2.com.