Wildcard domain name problems

Source: Internet
Author: User
Tags in domain

1. You must have your own server to create a site on the server.
2. In domain name management, your domain name must support wildcard resolution. (Now, it seems that the two-line dual-IP Intelligent Resolution system does not support wildcard resolution, and other support)

Implementation method:

1. Add A record * .abc.com to your domain name management and your server ip address. Check validity: ping xxxx.abc.com from any second-level domain name.

2. Create a website on your server that is the content of the website to be accessed by www. User .abc.com. The host header must be left blank! (This server can only have this site host header empty)

3. asp write code: set the default homepage index. asp. This file contains another file. For example, check. asp checks whether the user name in the domain name is legal. The test method is simple:

For example, if you want to use user .abc.com for access

User_id = split (request. ServerVariables ("http_host"), ".") (0)

This user_id is the username you want to check and exit if it is invalid. If it is valid, access it.

For example, you want to access www. User .abc.com
Think for the same reason

You can access both of them. It's not hard for you to think about it yourself. However, they are generally accessed using user .abc.com.

So the implementation of this wildcard domain name asp only requires one sentence of code to implement. There is no difficulty at all. The key is that you must be able to operate the server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.