全球主机交流论坛

标题: 一个空间绑定多个域名,支持绑定到子目录 [打印本页]

作者: qqab    时间: 2011-12-14 13:27
标题: 一个空间绑定多个域名,支持绑定到子目录
  1.   RewriteEngine on


  2.   
  3. # m/wap.heqee.com 二级目录
  4.   RewriteCond %{REQUEST_URI} !^/wap/.*
  5.   RewriteCond %{HTTP_HOST} ^wap.heqee.com$ [OR]
  6.   RewriteCond %{HTTP_HOST} ^m.heqee.com$
  7.   RewriteRule ^(.*) /wap/$1 [L]

  8.   # ljrczx.com 域名ljrczx.com
  9.   RewriteCond %{REQUEST_URI} !^/lj/.*
  10.   RewriteCond %{HTTP_HOST} ^ljrczx.com$ [OR]
  11.   RewriteCond %{HTTP_HOST} ^www.ljrczx.com$
  12.   RewriteRule ^(.*) /lj/$1 [L]

  13.   # fzrczx.com 域名fzrczx.com
  14.   RewriteCond %{REQUEST_URI} !^/fz/.*
  15.   RewriteCond %{HTTP_HOST} ^fzrczx.com$ [OR]
  16.   RewriteCond %{HTTP_HOST} ^www.fzrczx.com$
  17.   RewriteRule ^(.*) /fz/$1 [L]
复制代码

作者: leelei    时间: 2011-12-14 13:29
win主机可以参考下面的
<%if Request.ServerVariables("SERVER_NAME")="aaa.com" then    '第一个输入的网址
response.redirect "flash/index.asp"                                               '将它转发到相应的文件夹
else%>

<%end if%>

<%if Request.ServerVariables("SERVER_NAME")="www.aaa.com" then  
response.redirect "flash/index.asp"                          
else%>

<%end if%>

<%if Request.ServerVariables("SERVER_NAME")="bbb.com" then     '第二个输入的网址
response.redirect "cd/index.asp"                                                 '将它转发到相应的文件夹
else%>

<%end if%>

<%if Request.ServerVariables("SERVER_NAME")="www.bbb.com" then
response.redirect "cd/index.asp"
else%>

<%end if%>

作者: master    时间: 2011-12-14 13:37
收藏了
作者: 格格男    时间: 2011-12-14 13:37
提示: 作者被禁止或删除 内容自动屏蔽
作者: 飞天金猪    时间: 2011-12-14 13:39
虚拟空间 不支持子目录的也行吗?
作者: cnweb    时间: 2011-12-14 13:41
用不了
作者: dotww    时间: 2011-12-14 13:50
不支持子录的话,最少要支持多域名到根目录的才行,不然的话还是没法用.
作者: hepac    时间: 2011-12-14 13:56
再往下要发帖教怎么建立子目录了
作者: ABCDEFG    时间: 2011-12-14 17:16
原帖由 master 于 2011-12-14 13:37 发表
收藏了

作者: KVMLA    时间: 2011-12-14 17:19





欢迎光临 全球主机交流论坛 (https://hostloc.onozo.cc/) Powered by Discuz! X3.4