首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

乞援!关于网站二级域名?

2011-12-15 
求助!关于网站二级域名??????????二级域名怎么分配?比如,我在域名提供商那里申请了一个域名如www.abc.com

求助!关于网站二级域名??????????
二级域名怎么分配?比如,我在域名提供商那里申请了一个域名如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

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


请参考

这里:http://www.cnblogs.com/jzywh/archive/2005/09/29/246650.html

热点排行