KesionCMSV4.0 個(gè)人空間二級(jí)域名轉(zhuǎn)向處理程序
更新時(shí)間:2007年09月02日 10:47:03 作者:
復(fù)制代碼 代碼如下:
<!--#include file="conn.asp"-->
<!--#include file="KS_Cls/KS.PublicCls.asp"-->
<%
'=============================================
'KesionCMSV4.0 個(gè)人空間二級(jí)域名轉(zhuǎn)向處理程序
'=============================================
'****************************************************
' Software name:Kesion CMS 4.0
' Email: service@kesion.com . QQ:111394,9537636
' Web: http://www.kesion.com http://www.kesion.cn
' Copyright (C) Kesion Network All Rights Reserved.
'****************************************************
Dim KSCls
Set KSCls = New SiteIndex
KSCls.Kesion()
Set KSCls = Nothing
Class SiteIndex
Private KS
Private From,gourl,sdomain,title,username
Private Sub Class_Initialize()
If (Not Response.IsClientConnected)Then
Response.Clear
Response.End
End If
Set KS=New PublicCls
End Sub
Private Sub Class_Terminate()
Call CloseConn()
Set KS=Nothing
End Sub
Public Sub Kesion()
From = LCase(Request.ServerVariables("HTTP_HOST"))
sdomain = LCase(KS.SSetting(15))
sdomain = Replace(sdomain,"http://","")
sdomain = Replace(sdomain,"/","")
dim domain1,domain2
domain = LCase (from)
domain = Replace (domain,"http://","")
domain = Replace (domain,"/","")
if sdomain=domain and sdomain<>"" then
title=KS.Setting(1) & "-個(gè)人空間"
gourl="space/index.asp"
else
domain1= Replace (Left (domain,InStr (domain,".")),".","")
if Trim (domain1)="" or domain1="www" Then Response.Redirect("index.asp"):Response.End
dim rs:set rs=conn.execute("select username,blogname from ks_blog where [domain]='" & KS.R(domain1) & "'")
if rs.eof and rs.bof then
rs.close:set rs=nothing
'=====================這里定義其它系統(tǒng)非個(gè)人空間的二級(jí)域名轉(zhuǎn)向,如論壇等=============================
if instr(Request.ServerVariables("SERVER_NAME"),"bbs.kesion.com")>0 then
response.redirect "bbs/index.asp"
elseif instr(Request.ServerVariables("SERVER_NAME"),"news.kesion.com")>0 then
response.redirect "news/"
elseif instr(Request.ServerVariables("SERVER_NAME"),"help.kesion.com")>0 then
response.redirect "help/"
else
response.redirect "index.asp"
end if
'============================================================================
exit sub
end if
title=rs("blogname")
domain1=rs("username")
rs.close:set rs=nothing
domain2= Right(domain,Len(domain)-InStr(domain,"."))
gourl="space/space.asp?username=" & domain1
end if
Response.Write ("<html>") & vbcrlf
Response.Write ("<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />") & vbcrlf
Response.Write ("<title>" & title & "</title>") & vbcrlf
Response.Write ("<head>") & vbcrlf
Response.Write ("</head>") & vbcrlf
Response.Write( "<frameset><frame src="""&gourl&"""></frameset>")
End Sub
End Class
%>
您可能感興趣的文章:
- 多域名綁定到一個(gè)空間訪問(wèn)不同首頁(yè)的技巧
- 同一空間綁定多個(gè)域名而實(shí)現(xiàn)訪問(wèn)不同頁(yè)面的PHP代碼
- asp下同一空間多綁多哥域名的方法
- 新學(xué)到的一招之單空間綁多域名實(shí)現(xiàn)提速
- 兩個(gè)或多個(gè)域名共用一個(gè)空間并可以獨(dú)立訪問(wèn)的方法
- 可綁定域名的德國(guó)10GB免費(fèi)PHP空間
- .htaccess 頂級(jí)域名重定向綁定空間目錄
- 如何將javaweb項(xiàng)目部署到linux下
- SSH框架網(wǎng)上商城項(xiàng)目第19戰(zhàn)之訂單信息級(jí)聯(lián)入庫(kù)以及頁(yè)面緩存問(wèn)題
- SSH框架網(wǎng)上商城項(xiàng)目第27戰(zhàn)之申請(qǐng)域名空間和項(xiàng)目部署及發(fā)布
相關(guān)文章
科汛V4.5偽靜態(tài)的實(shí)現(xiàn)正則規(guī)則
2008-02-02Window XP用戶安裝科訊關(guān)于權(quán)限問(wèn)題必看教程
Window XP用戶安裝科訊關(guān)于權(quán)限問(wèn)題必看教程...2007-09-09KesionCMS V4.x部份最常用的標(biāo)簽清單
KesionCMS V4.x部份最常用的標(biāo)簽清單...2007-09-09全面優(yōu)化V4.0及AJAX標(biāo)簽使用技巧
全面優(yōu)化V4.0及AJAX標(biāo)簽使用技巧...2007-09-09KesionCMSV4.0 個(gè)人空間二級(jí)域名轉(zhuǎn)向處理程序
KesionCMSV4.0 個(gè)人空間二級(jí)域名轉(zhuǎn)向處理程序...2007-09-09kesion 科訊不用登錄實(shí)現(xiàn)digg的修改方法
科訊4.5的系統(tǒng)增加了dig功能,可是不注冊(cè)的用戶無(wú)法digg是個(gè)不好的地方,本來(lái)國(guó)內(nèi)的民眾就不喜歡回復(fù),一個(gè)digg要注冊(cè)時(shí)很難的了,所以該了下。2008-01-01列出KesionCMS 4.0系統(tǒng)后臺(tái)菜單,讓大家熟悉下
列出KesionCMS 4.0系統(tǒng)后臺(tái)菜單,讓大家熟悉下...2007-09-09