I have created an application in PHP, I would like to re-direct the following URL to corresponding sub-domain.
Dynamic URL pattern:
http://mydomain.com/mypage.php?user_name=testuser
I wish to re-direct this to the corresponding sub domain:
http://testuser.mydomain.com/
- How do I create a rewrite rule for this purpose?
- How do I register DNS for sub-domain without using CPANEL? (I want to activate sub-domain when the user registers to the system.)