How to force resolution of domain names in the same space

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

In the site space does not support a subdirectory binding domain name, the webmaster How to put multiple stations in the same space, and each station use the first level or level two domain? Is this what is called "forced resolution of domain names"?

Now the domestic space is relatively expensive, and the quality of low-cost space is not high, and most of the space service providers do not provide child vision binding domain Name services, a few provide the service also charge a high cost. In short, the domestic virtual space is very depressed. In this case, the cost of doing the station is invisible to increase a lot of, especially to do site group webmaster.

I have several websites of my own (such as: Www.51qjj.net and www.51sben.cn, etc.) and have encountered these problems in choosing space. So, I created an idea: Choose a good service space provider, and then buy a relatively large space, and then put all their own sites in this space, and then use a certain code to each site to resolve the independent domain name. Perhaps this is also a lot of webmaster comrades to do.

So, I began to study the code, finally implemented to the same space for multiple sites to enforce domain name code. Through their own experience to introduce the following:

Oneself in a certain space place 2 websites, put under the subdirectory A, C, the directory A, C place the name of the home page is index.asp, then request a directory bound domain name http://www.xxx.cn/and b directory binding http://www.zzz.net/Then , you can do this by using the following code:

Now let's talk about the implementation of the feature:

1, in the browser input domain name http://www. xxx.cn/, will open the C directory of the site, the browser entered the website address will automatically become http://www.xxx.cn/C/index.asp.

2, in the browser input domain name http://www.zzz.net/, will open a directory of the site, the browser entered the website address will automatically become www.zzz.net/A/index.asp.

Using this method, the only flaw is the opening URL followed by a labeled subdirectory of the letter (such as a, c, etc.), and the search engine included in the page address also has a marked subdirectory of the letter. As to how to eliminate this defect, I am still in the further study, Welcome to discuss!

Finally, this method can achieve the above functions, because later I will http://www.xxx.cn replaced the PHP version of the site, so, also changed the space, there is no more than the demo, if you want to achieve this function, may wish to try their own.

Related Article

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.