婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > 多中語言實現判斷客戶訪問用得是那個域名 然后轉到對應的目錄

多中語言實現判斷客戶訪問用得是那個域名 然后轉到對應的目錄

熱門標簽:山西旅游景地圖標注 蘇州通信外呼系統多少錢 上古卷軸5地圖標注mod 荒野大鏢客2地圖標注怎么變中文 武漢人工外呼系統 中國地圖標注各省份 移動400辦理電話 沈陽智能外呼系統排名 北川縣地圖標注

多中語言實現判斷客戶訪問用得是那個域名 然后轉到對應的目錄 
asp版:

發表多個綁定多域名的ASP代碼

如果有有一個ASP空間,而你又想放置多個多個站點,這些代碼可以幫到你
第一個 
%if Request.ServerVariables("SERVER_NAME")="bbs.along.com.ru" then
response.redirect "bbs"
else
response.redirect "index1.htm"
end if%>

第二個
%
select case request.servervariables("http_host")
case "www.along.com.ru" '1
Server.Transfer("along.htm")
case "www.along.net.ru" '2
Server.Transfer("net.htm")
case "www.null.com.ru" '3
Server.Transfer("null.htm")
...... 繼續添加 ......
end select
%>

第三個
%if instr(Request.ServerVariables
("SERVER_NAME"),"fjsky.info")>0 then
response.redirect "index.asp"
else if instr(Request.ServerVariables
("SERVER_NAME"),"along.com.ru")>0 then
response.redirect "x/index.asp"
else if instr(Request.ServerVariables
("SERVER_NAME"),"along.net.ru")>0 thenr
esponse.redirect "index3.asp"
end if
end if
end if%>

第四個
%if Request.ServerVariables("SERVER_NAME")="www.fjsky.info" then
response.redirect "main1.asp"
else if Request.ServerVariables("SERVER_NAME")="fjsky.info" then
response.redirect "main1.asp"
else if Request.ServerVariables("SERVER_NAME")="www.null2.com.ru" then
response.redirect "/web/index.asp"
else if Request.ServerVariables("SERVER_NAME")="null2.com.ru" then
response.redirect "/web/index.asp"
end if
end if
end if
end if%>

第五個

'取得HTTP輸入的值并付值到HTOST中
host=lcase(request.servervariables("HTTP_HOST"))
'開始條件跳轉
SELECT CASE host
' 如果HOST的值是www.iswind.net就選擇事件case"www.iswind.net"的命令
CASE "www.abc.net"
' Below is the redirect command
response.redirect "web/"
CASE "www.efd.com"
response.redirect "web1/"
'We use CASE ELSE to fix any other requests
CASE ELSE
response.redirect "web1/"
END SELECT 
%> 

js版:
script>
try 
{ if( self.location == "http://玉米一/" ) 
{
top.location.href = "http://玉米一/目錄";
}
else if( self.location == "http://玉米二/" ) 
{
top.location.href = "http://玉米二/目錄";
}
else if( self.location == "http://玉米三/" ) 
{
top.location.href = "http://玉米三/目錄";
}
else if( self.location == "http://玉米四/" ) 
{
top.location.href = "http://玉米四/目錄";
}
else 
{ document.write ("錯誤的訪問地址") } 

catch(e) { }
/script> 




case "domain.com":
header("location:blog");
break;
default:
header("location:news");
break;
}
?>

或者

?php
$domain_net="yeahe.com";
$dot_net_url="bbs/";
$dot_com_url="flash";
if(($HTTP_HOST=="$domain_net")or($HTTP_HOST=="www.$domain_net"))
{
Header("Location: $dot_net_url");
}
else
{
Header("Location: $dot_com_url");
}
?>

標簽:邯鄲 遼源 南充 喀什 陽泉 海東 濱州 東莞

巨人網絡通訊聲明:本文標題《多中語言實現判斷客戶訪問用得是那個域名 然后轉到對應的目錄》,本文關鍵詞  多中,語言,實現,判斷,客戶,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《多中語言實現判斷客戶訪問用得是那個域名 然后轉到對應的目錄》相關的同類信息!
  • 本頁收集關于多中語言實現判斷客戶訪問用得是那個域名 然后轉到對應的目錄的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 巩留县| 莒南县| 潼关县| 威海市| 长武县| 秦安县| 云龙县| 远安县| 错那县| 黄龙县| 建宁县| 石阡县| 南通市| 徐州市| 女性| 砀山县| 金溪县| 伊川县| 庆阳市| 扎囊县| 巴彦县| 寿阳县| 黄山市| 涪陵区| 宝鸡市| 怀集县| 靖江市| 灌南县| 东海县| 新巴尔虎左旗| 当涂县| 保定市| 江孜县| 靖宇县| 广饶县| 兴文县| 尼木县| 福泉市| 清镇市| 新宾| 平顶山市|