如何用我的国际域名做虚拟域名?

时间:2010-06-16 09:53:00 

如何用我的国际域名做虚拟域名?
config.asp

<%
Domain_URL = "intels.net"
' 域名
Ad = 0
' 是否有广告弹出
Fo = 0
' 是否使用框架
DBPath = "DRIVER={Microsoft Access Driver (*.mdb)};dbq=" & 
Server.MapPath("Domain.Mdb")
CopyRight = "Asp之家"
' 版权信息
%>

 
default.asp

<%@ LANGUAGE=VBScript%>
<%Response.Expires=0%>
<!-- #include file="Config.Asp" -->
<%Server_Name = Request.ServerVariables("SERVER_NAME")
For I=1 To Len(Server_Name)
If Mid(Server_Name,i,1)="." Then Exit For
USER = USER & Mid(Server_Name,i,1)
Next
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open DBPath
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open "SELECT * FROM USER WHERE USER_USERNAME='" & USER & "'",Conn
If rs.bof Then
Rs.Close
Set Rs = Nothing
Conn.Close
Set Conn = Nothing
Response.Redirect "Main.Asp"
End If
URL = Rs("USER_URL")
Rs.Close
Set Rs = Nothing
Conn.Close
Set Conn = Nothing
If Ad=1 Then
Ad="<script language='JavaScript'>Popup = window.open
('', 'Popupnav', 'width=200,height=150,resizable=0,scrollbars=auto');h
qtpopup.location.href = 'Ad.Asp';</script>"
End If
If Fo=1 Then%>
<html>
<head>
<title>虚拟域名 - asp之家</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset rows="0,*" cols="*" border=0 framespacing=0> 
  <frame name="Top" src="Top.Asp">
  <frame name="Down" src="<%=URL%>">
</frameset>
<noframes>
<body>
噢,您的浏览器不支持框架显示!
</body>
</noframes>
</html>
<%Else%>
<meta http-equiv="refresh" content="0;url=<%=URL%>">
<%End If%>

数据库domain.mdb结构:
user表
USER_ID    USER_USERNAME    USER_PWD    USER_URL    USER_EMAIL

标签:虚拟,域名,asp
0
投稿

猜你喜欢

  • SQL Server 查询分析器快捷键集合

    2007-08-17 09:42:00
  • 带农历及节日的js日历源码

    2010-08-01 17:38:00
  • asp 判断是否为搜索引擎蜘蛛的代码

    2011-03-10 11:03:00
  • SQL Server 2008的一些新特点及独到之处

    2009-01-15 12:59:00
  • 有用的SQL语句(删除重复记录,收缩日志)

    2008-03-04 16:59:00
  • 如何用Cookie进行登录验证?

    2010-06-12 12:34:00
  • 《悟透JavaScript》之 甘露模型

    2008-06-09 14:03:00
  • 如何在SQL Server中由原子建立分子查询

    2009-01-20 16:01:00
  • FileSystem对象常用的文件操作函数有哪些?

    2009-11-01 15:11:00
  • 前端开发中的一些用户体验细节

    2010-10-19 12:23:00
  • 快速让MySQL数据库服务器支持远程连接

    2010-01-16 13:06:00
  • 在MySQL数据库中如何来复位根用户的密码

    2008-12-03 16:57:00
  • 关于基于字体大小(em)的设计

    2008-06-17 15:01:00
  • 不要使用@import[译]

    2009-05-01 12:01:00
  • GetPageSize和GetPageScroll:获取页面大小、窗口大小和滚动条位置

    2008-12-27 22:30:00
  • 《HTML5设计原理》读后随记

    2011-01-25 12:26:00
  • 301转向代码合集

    2008-03-20 10:12:00
  • SQL Join的一些总结(实例)

    2012-08-21 10:19:29
  • ORACLE 最大连接数的问题

    2009-07-23 14:27:00
  • Oracle7.X 回滚表空间数据文件误删除处理方法

    2010-07-28 12:54:00
  • asp之家 网络编程 m.aspxhome.com