I have a secondary domain name which I need its subdomains to point to my main domain. For example,If my main domain is example.com, then I have used example.org to point to the former. What I desire to achieve is for all subdomains of the main one to be also pointed at by the secondary domain. I mean, for instance, if I have
example.com/about
example.com/contact
.
.
.
I want them also be pointed at with
example.org/about
example.org/contact
.
.
.
Please let me know how I can do that through mod_rewrite rules as the examples I have found through googling, only focus on redirecting from a secondary domain to the main one, without mentioning how to redirect the subdomains as well.
PS: Currently, example.org is correctly replaced with example.com. But for subdomain it is not so. I mean, for instance, example.org/contact is not replaced by example.com/contact.
Update: My htaccess file includes the following
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]