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

Like my requirement is My current domain title and let say i've three domian and subdomain the subdomain url is

Now i would like whenever user attempt to access it will obtain the content of 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 ^(.*)$1 [L,R]

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

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

This could rewrite e.g. to