Dynamic Subdomain Creation @ the time of User Registration

Hi all,

I am very new in Yii2…I want to make project in where after registration of every user he/she will get his/her own sub domain…

Like My website is abc.com

Now after successfully completion of registration of USER1, he will get or redirect to user1.abc.com

similarly after successfully completion of registration of USER2, he will get or redirect to user2.abc.com and so on…

even for every user database also create dynamically with some basic tables and data…

I know that I have to set up the Wild Card Sub Domain with help of my server provider…

But in yii what I have to make changes or include…like do I have to make any changes to .htaccess file

Please guide me…

Thank you in advance…