多个域名绑定一个空间互不影响
点击次数:30 次 发布日期:2008-11-23 19:10:08 作者:源代码网
|
源代码网推荐 创建网站默认的首页文件(通常为"index.asp"或"default.asp")如下: 源代码网推荐 源代码网推荐 源代码网推荐<% 源代码网推荐"取得HTTP输入的值并付值到HTOST中 源代码网推荐host=lcase(request.servervariables("HTTP_HOST")) 源代码网推荐"开始条件跳转 源代码网推荐SELECT CASE host 源代码网推荐" 如果HOST的值是www.abc0.com就选择事件case"www.abc0.com"的命令 源代码网推荐CASE "www.abc0.com" 源代码网推荐" Below is the redirect command 源代码网推荐response.redirect "index_abc0.asp" 源代码网推荐CASE "www.abc1.com" 源代码网推荐" Below is the redirect command 源代码网推荐response.redirect "index_abc1.asp" 源代码网推荐CASE "www.abc2.com" 源代码网推荐" Below is the redirect command 源代码网推荐response.redirect "index_abc2.asp" 源代码网推荐" 继续添加... 源代码网推荐CASE "www.abcn.com" 源代码网推荐" Below is the redirect command 源代码网推荐response.redirect "index_abcn.asp" 源代码网推荐 源代码网推荐"We use CASE ELSE to fix any other requests 源代码网推荐CASE ELSE 源代码网推荐response.redirect "default.asp" 源代码网推荐END SELECT 源代码网推荐%> 源代码网推荐 源代码网推荐 源代码网推荐 第二步:创建相应的被转向文件 源代码网推荐 创建"index_abc0.asp"—"index_abcN.asp",作为各个网站的首页。 源代码网推荐 源代码网推荐 第三步:将多个域名的IP地址解析到同一个网站空间 源代码网推荐 例如:将"www.abc1.com"—"www.abcN.com"的IP地址全部解析到"www.abc1.com"的WEB空间上。 源代码网推荐 源代码网推荐 第四步:设置网站的WEB服务 源代码网推荐 设置WEB服务的别名为:"www.abc1.com www.abc2.com www.abc3.com ...... www.abcN.com"(注意:别名之前用一个空格分开) 源代码网推荐 源代码网推荐 现在你就可以使用象" "、……、" "这类顶级的网址来访问同一个WEB空间,而得到各不相同的首页面了。
上一页12 下一页 源代码网供稿. |

"、……、"