Apache host general support. Htaccess pseudo-static, that can be implemented to bind the domain name to subdirectories, a space multiple sites.
Application Example: Binding htaccess.800m.net to htaccess directory
root directory. htaccess content
<ifmodule mod_rewrite.c>rewriteengine onrewritebase/# binding htaccess.800m.net to subdirectories Htaccessrewritecond%{HTTP_HOST } ^htaccess\.800m\.net$ [Nc]rewritecond%{request_uri}!^/htaccess/rewriterule ^ (. *) $ htaccess/$1? Rewrite [L,QSA] #可以绑定多个, just repeat the last three lines of code and change the domain name, directory name on the line </IfModule>
Even if the "." In the Http_host It is also possible to implement binding htaccess.800m.net without backslashes, because "." Can match any one character.
. htaccess content in the htaccess directory
<ifmodule mod_rewrite.c>rewriteengine onrewritebase/#只许绑定的域名访问, other domain 301 jump rewritecond%{http_host}!^htaccess\ .800m\.net$ [Nc]rewriterule (. *) http://htaccess.800m.net/$1 [l,r=301] #对绑定目录下htaccess目录的处理RewriteCond%{request_uri } ^\/htaccess\/[Nc]rewritecond%{query_string}!^ (. *)? Rewrite
#htaccess. 800m.net/htaccess actually accesses Htaccess.800m.net/htaccess/htaccessrewriterule ^ (. *) $/%{request_uri}/%{request_ Uri}/$1? Rewrite [l,qsa]</ifmodule>
Of course, if the requirements for a bound subdirectory are not high, you do not need to create a. htaccess file under the subdirectory.
. htaccess pseudo static (URL rewrite) bind domain names to subdirectories implement subwebs