時(shí)間:2023-06-29 03:39:01 | 來(lái)源:網(wǎng)站運(yùn)營(yíng)
時(shí)間:2023-06-29 03:39:01 來(lái)源:網(wǎng)站運(yùn)營(yíng)
一個(gè)虛擬主機(jī)開(kāi)多個(gè)網(wǎng)站的辦法:目前我使用的是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)鍵詞:辦法,虛擬,主機(jī)
客戶(hù)&案例
營(yíng)銷(xiāo)資訊
關(guān)于我們
客戶(hù)&案例
營(yíng)銷(xiāo)資訊
關(guān)于我們
微信公眾號(hào)
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。