讓多個域名綁定一個空間,并且互不影響
第一步:創(chuàng)建轉(zhuǎn)向控制頁面
創(chuàng)建網(wǎng)站默認(rèn)的首頁文件(通常為"index.asp"或"default.asp")如下:
<%
'取得HTTP輸入的值并付值到HTOST中
host=lcase(request.servervariables("HTTP_HOST"))
'開始條件跳轉(zhuǎn)
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"
' 繼續(xù)添加...
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
%>
第二步:創(chuàng)建相應(yīng)的被轉(zhuǎn)向文件
創(chuàng)建"index_abc0.asp"―"index_abcN.asp",作為各個網(wǎng)站的首頁。
第三步:將多個域名的IP地址解析到同一個網(wǎng)站空間
例如:將"www.abc1.com"―"www.abcN.com"的IP地址全部解析到"www.abc1.com"的WEB空間上。
第四步:設(shè)置網(wǎng)站的WEB服務(wù)
設(shè)置WEB服務(wù)的別名為:"www.abc1.com www.abc2.com www.abc3.com ...... www.abcN.com"(注意:別名之前用一個空格分開)
目前你就能使用象"http://www.abc1.com"、……、"http://www.abcN.com"這類頂級的網(wǎng)址來訪問同一個WEB空間,而得到各不相同的首頁面了。
標(biāo)簽: 濟(jì)南網(wǎng)站建設(shè) 網(wǎng)站建設(shè) 濟(jì)南網(wǎng)站制作 網(wǎng)址: www.haoli824.com
- 打印本文
- 關(guān)閉本頁
- 建站服務(wù)熱線:0531-68808868 售后服務(wù)專線:0531-88961515