時(shí)間:2024-01-05 05:12:01 | 來(lái)源:網(wǎng)站運(yùn)營(yíng)
時(shí)間:2024-01-05 05:12:01 來(lái)源:網(wǎng)站運(yùn)營(yíng)
一個(gè)虛擬主機(jī)綁定兩個(gè)域名,訪(fǎng)問(wèn)時(shí)跳轉(zhuǎn)不同站點(diǎn),這個(gè)怎樣實(shí)現(xiàn)?:目前我使用的是ASP頁(yè)面跳轉(zhuǎn),不是太完美,如果有改進(jìn)辦法請(qǐng)聯(lián)系我。<%if Request.ServerVariables("SERVER_NAME")="http://www.98gu.com" then Response.Status="301 Moved Permanently"Response.AddHeader "Location","http://www.98gu.com/index.php"Response.Endelseif Request.ServerVariables("SERVER_NAME")="blog.98gu.com" then Response.Status="301 Moved Permanently"Response.AddHeader "Location","http://blog.98gu.com/blog/"Response.Endend if%>如需增加跳轉(zhuǎn)只需要復(fù)制
elseif Request.ServerVariables("SERVER_NAME")="blog.98gu.com" then Response.Status="301 Moved Permanently"Response.AddHeader "Location","http://blog.98gu.com/blog/"Response.End這段即可,跳轉(zhuǎn)上限根據(jù)虛擬主機(jī)可以綁定多少域名來(lái)決定,理論上可以無(wú)限增加。
<%if Request.ServerVariables("SERVER_NAME")="www.98gu.com" then response.redirect "/index.php" elseif Request.ServerVariables("SERVER_NAME")="blog.98gu.com" then response.redirect "blog/" end if%>原理是一樣的,對(duì)于301跳轉(zhuǎn)還是302跳轉(zhuǎn)還請(qǐng)自己選擇,跳轉(zhuǎn)的缺陷還在思考怎么解決,最好還是多虛擬主機(jī)吧。
關(guān)鍵詞:實(shí)現(xiàn),怎樣,訪(fǎng)問(wèn),主機(jī),虛擬
客戶(hù)&案例
營(yíng)銷(xiāo)資訊
關(guān)于我們
客戶(hù)&案例
營(yíng)銷(xiāo)資訊
關(guān)于我們
微信公眾號(hào)
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。