Here is a problem where a site is hosted under different virtual hosts with different domain names.
And, we want to redirect to or show only http://www.example.com domain to our clients.
Then, make some changes as below in main apache config file that is:
<VirtualHost *:80> ServerName www.example.net ServerAlias example.com Redirect permanent / http://www.example.com/ </VirtualHost>
<VirtualHost *:80> ServerName www.example.com DocumentRoot /usr/local/apache/htdocs </VirtualHost>