xampp htaccess目录到子域

I have XAMPP on my computer and a domain purchased from GoDaddy. I have set up an A record and I can access it through http://massmailerpro.com/

Now I have one directory that can be accessed at http://massmailerpro.com/cacat. How can I transform this into cacat.massmailerpro.com with htaccess or, better, with PHP, when a user registers?

My massmailerpro.com directs me to my external IP address 79.119.0.11, I intend to buy some Raspberry Pi and host some low cost websites and I need subdomaains.

you can use the settings from httpd-vhosts D:\xampp\apache\conf\extra\httpd-vhosts.conf

<VirtualHost 79.119.0.11:80>
    DocumentRoot "C:/xampp/htdocs/cacat.massmailerpro.com"
    ServerName cacat.massmailerpro.com
</VirtualHost>