多域名綁定到一個空間訪問不同首頁的技巧
更新時間:2006年09月30日 00:00:00 作者:
將多個域名綁定到一個空間,訪問不同的首頁。這樣設立更多的子站點:)
空間內默認首頁(通常是 index.asp 或 default.asp )使用 Request.ServerVariables("HTTP_HOST") 獲取用戶訪問時所使用域名,然后使用 Select 調用不同文件,可用 Response.Redirect 或 Server.Transfer
Dim cc_str_host_name
cc_str_host_name = LCase(Request.ServerVariables("HTTP_HOST"))
'判斷主機名進行跳轉
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
空間內默認首頁(通常是 index.asp 或 default.asp )使用 Request.ServerVariables("HTTP_HOST") 獲取用戶訪問時所使用域名,然后使用 Select 調用不同文件,可用 Response.Redirect 或 Server.Transfer
復制代碼 代碼如下:
Dim cc_str_host_name
cc_str_host_name = LCase(Request.ServerVariables("HTTP_HOST"))
'判斷主機名進行跳轉
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
相關文章
再來個專門為google量身定做的sitemap生成代碼,(可是動態(tài)的哦)
再來個專門為google量身定做的sitemap生成代碼,(可是動態(tài)的哦)...2006-12-12