Want to use WordPress to achieve a lightweight blog function (non-WP mu), but the two-level domain name part does not know how to deal with, want to know like Dot, Sina Blog so users submit their own two-level domain name and automatic resolution is how to achieve?
Reply content:
Want to use WordPress to achieve a lightweight blog function (non-WP mu), but the two-level domain name part does not know how to deal with, want to know like Dot, Sina Blog so users submit their own two-level domain name and automatic resolution is how to achieve?
A record of domain name resolution:
@
--->justjavac.com
www
--->www.justjavac.com
*
--->*.justjavac.com
In the way 3 can be implemented, and then in the Web driven by PHP processing, no need for DNS-related programming.
See for a long while did not answer right, Proxy server (Nginx, Apache) forwarding can be, for example you are wang.sina.com directly into Www.sina.com/wang
泛域名解析
Pan-Resolution
*.yuming.com
You can judge this.
Method One
- With pan domain name resolution, all subdomains under a top-level domain are pointed to an IP address and then distinguished by the virtual host of the HTTP server.
Method Two
- Build a DNS server yourself, and then add an NS record to the top-level domain to point to the DNS server, so that all subdomains are given to their own established servers to parse.
The same upstairs, the general DNS resolution service providers (like Dnspod) support domain name Pan-resolution, you can add similar *.abc.com resolution
You can then determine which site to request on your server's HTTP service (such as Nginx) based on the domain name
or in your website program, through the host to determine which domain the user is visiting, and then show the different content
Generally through the pan domain name to resolve, and now many service providers are supported!
Pan-resolution + pseudo-static can be done
It seems that people are asking for automatic analysis, what do you answer?
I think I can do a pan-resolution, go to a specific URL, and then use the regular to take the user name, and then use htaccess to do the turn or rewrite