以這兩個域名為例:
http://www.49028c.com/
http://code.VeVb.com/
這兩個域名都是綁在同一個空間上,哈,但會跳到不同的目錄,不是在IIS設置上實現的,只是一小段asp代碼,哈,。。。給出代碼大家看看,雖然不是什么高深的東西,但挺實用的。
Code: 以下是引用片段:
<%
'取得HTTP輸入的值并付值到HTOST中
host=lcase(request.servervariables("HTTP_HOST"))
‘開始條件跳轉
SELECT CASE host
' 如果HOST的值是code.VeVb.com/就選擇事件case"code.VeVb.com/"的命令
CASE "code.VeVb.com/"
' Below is the redirect command
response.redirect "homepage/"
CASE "www.49028c.com"
response.redirect "/"
'We use CASE ELSE to fix any other requests
CASE ELSE
response.redirect "/"
END SELECT
%>
新聞熱點
疑難解答