全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1244|回复: 9
打印 上一主题 下一主题

[经验] 一个空间绑定多个域名,支持绑定到子目录

[复制链接]
跳转到指定楼层
1#
发表于 2011-12-14 13:27:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  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]
复制代码
2#
发表于 2011-12-14 13:29:00 | 只看该作者
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%>
3#
发表于 2011-12-14 13:37:24 | 只看该作者
收藏了
4#
发表于 2011-12-14 13:37:50 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
5#
发表于 2011-12-14 13:39:40 | 只看该作者
虚拟空间 不支持子目录的也行吗?
6#
发表于 2011-12-14 13:41:14 | 只看该作者
用不了
7#
发表于 2011-12-14 13:50:38 | 只看该作者
不支持子录的话,最少要支持多域名到根目录的才行,不然的话还是没法用.
8#
发表于 2011-12-14 13:56:13 | 只看该作者
再往下要发帖教怎么建立子目录了
9#
发表于 2011-12-14 17:16:50 | 只看该作者
原帖由 master 于 2011-12-14 13:37 发表
收藏了
10#
发表于 2011-12-14 17:19:50 | 只看该作者
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-11-25 19:41 , Processed in 0.104697 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表