How to dynamically create subdomains

前端 未结 2 2018
孤城傲影
孤城傲影 2020-12-03 18:44

I want to dynamically create new sub domains on my website. i mean if you have example.com then you dynamically create sub.example.com .

i looked on google and there

相关标签:
2条回答
  • 2020-12-03 19:02

    You can't do this unless you have permission to alter the DNS server for your domain.

    0 讨论(0)
  • 2020-12-03 19:21

    You need to setup a wildcard subdomain. Basically, anything.mysite.com will resolve to mysite.com. At that point it's up to your code to kick in and serve up the proper content depending on what subdomain the user is looking at.

    http://www.google.lk/search?q=wildcard+subdomain

    0 讨论(0)
提交回复
热议问题