catchall (catch-all) subdomains usinf cpanel and htaccess

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I have looked around on how to do this but noone seems to know how to
do this.
I hope by starting this thread I will get to a solution and help other
people searching as it is a commons issue..

This is the background and what I have done till now.

So, I have cpanel access from my provider, also I am a reseller and
have whm access.

until now, I found a way to convert : to

this can be done easily using the .htaccess file on the root of your
file structure:
So just edit or create the file .htaccess and make sure it contains
those lines :

RewriteEngine On
RewriteBase /
RewriteCond % !^www\.mydomain\.com
RewriteCond % ([^.]+)\.mydomain\.com [NC]
RewriteRule ^(.*)$ [L,R]

replace "mydomain" with your domain
the last line can be modified to redirect a domain anywhere you want.
for example replacing the last line with :
RewriteRule ^(.*)$ [L,R]
will result in visitors visiting " " to be
taken to

all this will hapen provided you have already a folder named example1
in your file structure!
I am trying to redirect people without having this folder there.

Anyone got any ideas?
I tested my domain to see if it catches all subdomains by default by
visiting  , it doesn't , i receive an error page.
I thought i should modify the dns zones.
I cannot do this in my main domain, as cpanel does not give that
so i experiment using a domain un my whm
I go to Main >> DNS Functions >> Edit DNS Zone   in the whm .
I add a zone  *   1440  A   (my shared
ip that is repeated in all the other entries)

after doing that, and using the htaccess file,
returns a blank page instead of an error page.
I suspect this page is blank by default and is located somewher else,
not in my directories.

Any ideas on what else I could do? Any wrong in my thinking?

Site Timeline