How to let PHP to create subdomain automatically for each user?

前端 未结 12 1149
暖寄归人
暖寄归人 2020-11-22 13:43

How do I create subdomain like http://user.mywebsite.com ? Do i have to access htaccess somehow? Is it actually simply possible to create it via pure php code or I need to u

12条回答
  •  青春惊慌失措
    2020-11-22 14:04

    You could [potentially] do a rewrite of the URL, but yes: you have to have control of your DNS settings so that when a user is added it gets its own subdomain.

提交回复
热议问题