A set of million network domain name + space, a set of 90 sail host +TK free domain name, seemingly do not support the binding subdirectory, MOM eggs!
Find a way on the net, feasible, the virtual host seems to need to support PHP system, the Web directory to create a. htaccess file, if the prompt "file name cannot be empty", open-Save As-all files, you can change the name.
This rewrite writing seems to involve pseudo-static, to find a detailed article:
URL rewriting: Rewritecond instruction and Rewriterule instruction format
The main function of Rewirte is to implement the URL jump and hide the real address, based on the Perl language regular expression specification. Usually help us to achieve quasi-static, quasi-directory, domain name jump, prevent hotlinking and so on.
My Code:
1 # Open the Rewriteengine mode2 Rewriteengine on3 4Rewitebase/5 6Rewritecond%{http_host} ^ (bbs\.)?tuwenclub\.com$ [NC]7Rewritecond%{request_uri}!^/Bbs/8Rewritecond%{request_filename}!-F9Rewritecond%{request_filename}!-DTenRewriterule ^ (. *) $ BBS/$ One # No default to enter the file name to the first page ARewritecond%{http_host} ^ (bbs\.)?tuwenclub\.com$ [NC] -Rewriterule ^ (/)? $ bbs/forum.php [L]
Online A annotated code, should be the same as mine, in order to prevent their inability to run, two are affixed to the, because this has a note, as a reference:
create a new. htaccess file at the root of the Web site, adding the following statement to the file: Rewriteengine on # change bbs.dakm.cn to the domain you want to bind. Rewritecond%{http_host} ^ (www.)?bbs.dakm.cn$ # Change the BBS to the directory to bind. Rewritecond%{request_uri}!^/Bbs/# do not change the following two lines. Rewritecond%{request_filename}!-F Rewritecond%{request_filename}!-D # Change the BBS to a directory to bind to. Rewriterule^(.*)$/Bbs/$# change bbs.dakm.cn to the domain you want to bind # change the BBS to a directory to bind to. # BBS/the back is home file index.php, index.html ... Rewritecond%{http_host} ^ (www.)?bbs.dakm.cn$ Rewriterule^(/)? $ bbs/index.php [L] above the entire set of statements is bound to a subdirectory, if you want to bind more than one subdirectory, you can add the above statement repeatedly!
Two-level domain name binding to subdirectories "good!" 】