多域名綁定到一個空間訪問不同首頁的技巧
更新時間:2006年09月30日 00:00:00 作者:
將多個域名綁定到一個空間,訪問不同的首頁。這樣設立更多的子站點:)
空間內(nèi)默認首頁(通常是 index.asp 或 default.asp )使用 Request.ServerVariables("HTTP_HOST") 獲取用戶訪問時所使用域名,然后使用 Select 調(diào)用不同文件,可用 Response.Redirect 或 Server.Transfer
Dim cc_str_host_name
cc_str_host_name = LCase(Request.ServerVariables("HTTP_HOST"))
'判斷主機名進行跳轉(zhuǎn)
Select Case cc_str_host_name
Case "www.kuozhanming.com"
Server.Transfer "main.asp"
Case "www.suoxie.com"
Server.Transfer "main_2.asp"
Case Else
Server.Transfer "main_3.asp"
End Select
空間內(nèi)默認首頁(通常是 index.asp 或 default.asp )使用 Request.ServerVariables("HTTP_HOST") 獲取用戶訪問時所使用域名,然后使用 Select 調(diào)用不同文件,可用 Response.Redirect 或 Server.Transfer
復制代碼 代碼如下:
Dim cc_str_host_name
cc_str_host_name = LCase(Request.ServerVariables("HTTP_HOST"))
'判斷主機名進行跳轉(zhuǎn)
Select Case cc_str_host_name
Case "www.kuozhanming.com"
Server.Transfer "main.asp"
Case "www.suoxie.com"
Server.Transfer "main_2.asp"
Case Else
Server.Transfer "main_3.asp"
End Select
相關(guān)文章
asp 數(shù)組 重復刪除函數(shù)(腳本之家增強版)
這篇文章是asp下刪除重復數(shù)組的函數(shù),已經(jīng)經(jīng)過測試。2010-05-05再來個專門為google量身定做的sitemap生成代碼,(可是動態(tài)的哦)
再來個專門為google量身定做的sitemap生成代碼,(可是動態(tài)的哦)...2006-12-12