Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
 
I have opened a stand-alone IP Linux space from the website, the space supports pseudo static function. Because the site root directory installed is the Dedecms,bbs directory installed is the forum, the home directory installation is Ucenterhome, the virtual host only support the root directory binding domain name, how to allow the site to support the two-level domain name? I'll teach you how to use. htaccess to achieve a Web site space can use more than two domain names to point to multiple level two directory, to establish multiple sites. Take a standalone IP virtual host for example:
 
First, the domain name to do a pan-resolution *.xxxx.com resolution to your space IP, independent IP virtual host support pan-resolution, do not need to bind domain names can access the site.
 
Second, the establishment of BBS, home directory, the CMS uploaded to the root directory, the forum uploaded to the BBS directory, will ucenterhome upload to the home directory.
 
Third, open Notepad to copy the following code into, save as. htaccess file, upload to root directory.
 
The contents of the. htaccess file are as follows: (take xxx.cn domain name as an example)
 
Rewriteengine on
 
DirectoryIndex index.php index.html index.htm
 
#让www. xxx.cn access to the root directory cms
 
Rewritecond%{http_host} ^www.xxx.cn$
 
Rewritecond%{request_uri}!^/
 
Rewritecond%{request_filename}!-f
 
Rewritecond%{request_filename}!-d
 
Rewriterule ^ (. *) $/$1
 
Rewritecond%{http_host} ^www.xxx.cn$
 
Rewriterule ^ (/) $/index.php [L]
 
#让home. xrnic.cn access to the home directory Ucenterhome
 
Rewritecond%{http_host} ^home.xxx.cn$
 
Rewritecond%{request_uri}!^/home/
 
Rewritecond%{request_filename}!-f
 
Rewritecond%{request_filename}!-d
 
Rewriterule ^ (. *) $/home/$1
 
Rewritecond%{http_host} ^home.xxx.cn$
 
Rewriterule ^ (/) $ home/index.php [L]
 
#让bbs. xrnic.cn Access BBS Directory Forum
 
Rewritecond%{http_host} ^bbs.xxx.cn$
 
Rewritecond%{request_uri}!^/wap/
 
Rewritecond%{request_filename}!-f
 
Rewritecond%{request_filename}!-d
 
Rewriterule ^ (. *) $/bbs/$1
 
Rewritecond%{http_host} ^bbs.xxx.cn$
 
Rewriterule ^ (/) $ bbs/index.php [L]
 
According to the above method can be a space to establish n sites, of course, you can also put other top-level domain name to the subdirectory, to achieve a space to establish a number of Web site functions. The above tutorial by the old webmaster Xrnic finishing, I hope a lot of space to build a number of Web site friends can use, reproduced please indicate from www.xrnic.cn, thank you.