日期:2014-05-18  浏览次数:20456 次

求助!关于网站二级域名??????????
二级域名怎么分配?比如,我在域名提供商那里申请了一个域名如www.abc.com
我自己架设一台服务器,别人在我的网站里注册,我要分配一个二级域名给它,请问怎么办。


------解决方案--------------------
你可以做一个泛域名,然后再用程序指向
------解决方案--------------------
做泛域名指向到你自己的服务器
可以用微软的URLrewriter,按江大鱼的方法修改一下
就可以支持域名重写
------解决方案--------------------
Select Case host_level
Case 1
cmd = New SqlCommand( "select AgentArea,AgentAreaID from AgentInfo where (AgentLevel= '1 ' or AgentLevel= '0 ' or AgentAreaID like @AgentAreaID) and AgentHost=@AgentHost ", conn)
cmd.Parameters.Add( "@AgentHost ", url_1)
cmd.Parameters.Add( "@AgentAreaID ", "00% ")
rs = cmd.ExecuteReader(CommandBehavior.SingleRow)
If rs.Read Then
Dim Agent_name As New HttpCookie( "Agent_name_s ", HttpUtility.UrlEncode(rs( "AgentArea ")))
Response.Cookies.Add(Agent_name)
Dim Agent_ID As New HttpCookie( "Agent_ID_s ", rs( "AgentAreaID "))
Response.Cookies.Add(Agent_ID)
rs.Close()
Else
rs.Close()
conn.Close()
Response.Redirect( "http://www. " & web_host)
Response.End()
End If
Case 2
cmd = New SqlCommand( "select AgentArea,AgentAreaID from AgentInfo where (AgentLevel= '2 ' or AgentAreaID like @AgentAreaID) and AgentHost=@AgentHost ", conn)
cmd.Parameters.Add( "@AgentHost ", url_1)
cmd.Parameters.Add( "@AgentAreaID ", "00% ")
rs = cmd.ExecuteReader(CommandBehavior.SingleRow)
If rs.Read Then
Dim Agent_name As New HttpCookie( "Agent_name_s ", HttpUtility.UrlEncode(rs( "AgentArea ")))
Response.Cookies.Add(Agent_name)
Dim Agent_ID As New HttpCookie( "Agent_ID_s ", rs( "AgentAreaID "))
Response.Cookies.Add(Agent_ID)
rs.Close()
Else
rs.Close()
conn.Close()
Response.Redirect( "http://www. " & web_host)
Response.End()
End If
Case 3
cmd = New SqlCommand( "select AgentArea,AgentAreaID from AgentInfo where AgentLevel= '3 ' and AgentHost=@AgentHost ", conn)
cmd.Parameters.Add( "@AgentHost ", url_1)
rs = cmd.ExecuteReader(CommandBehavior.SingleRow)
If rs.Read Then
Dim Agent_name As New HttpCookie( "Agent_name_s ", HttpUtility.UrlEncode(rs( "AgentArea ")))
Response.Cookies.Add(Agent_name)
Dim Agent_ID As New HttpCookie( "Agent_ID_s ", rs( "AgentAreaID "))
Response.Cookies.Add(Agent_ID)
rs.Close()
Else
rs.Close()
conn.Close()
Response.Redirect( "http://www. " & web_host)
Response.End()
End If
End Select

------解决方案--------------------