Recently help customers do Zencart website mobile template used to two level domain name, by judging the phone access to call two level directory program, http://afish.cnblogs.com/How to say than http://www.cnblogs.com/afish/look comfortable
If your host space supports sub-directories to bind level two domain names, here are the methods for sub-directories to bind level two domain names:
First, in the domain management background to add a two-level domain name "alias (CNAME)", I have added a "afish.cnblogs.com" of the two-level domain name
Second, enter the host management background, in the "sub-Directory Binding" page, add this level two domain name
Three, set up, two-level domain name can be used immediately.
What if your host does not support the binding subdirectory? If you are using a PHP host, you can try the following methods.
Create a new one in the Web site root directory.htaccess file, include the following statement in this file: Rewriteengine on#change the afish.cnblogs.com to the domain you want to bind.Rewritecond%{http_host} ^ (www.)?afish.cnblogs.com$#change the afish to the directory you want to bind.Rewritecond%{request_uri}!^/afish/#do not change the following two lines.Rewritecond%{request_filename}!-Frewritecond%{request_filename}!-D#change the afish to the directory you want to bind.Rewriterule ^ (. *) $/afish/$1#change the afish.cnblogs.com to the domain you want to bind#change the afish to the directory you want to bind.#afish/Back is home file index.php, index.html ...Rewritecond%{http_host} ^ (www.)?Afish.cnblogs.com$rewriterule^ (/)? $ afish/index.php [L] above the entire set of statements is bound to a subdirectory, if you want to bind multiple subdirectories, you can add the above statement repeatedly!
About the site subdirectory binding level two domain name method (PHP website mobile side)