Second-level domain principles and procedures, you can apply for the application to open [normal framework secondary domain name]
To achieve the effect of a second-level name, the conditions and procedures must be taken:
1. There must be a top-level domain name, and this domain name must be parsed well and pointed well.
2. There must be an independent server. The general resolved domain name points to the server.
3. Create an empty host header web site in IIS on the server.
4. Set the default page to your second machine parsing program (for example:)
5. Second-level domain name series programs (including application page:, add page, parsing page,)
Advantages of this program:
a. Can limit the sensitive words of the domain name application, such as hacker, www, sex, china, etc.
b. Illegal words that can be restricted from applying for domain names, such as:! ·#¥%…—*()——? '"/wait
c, Only one domain name can be applied for per address.
d. Limit the length of the domain name applied.
e. If no one applies for the domain name the user visits, go to a specific page.
f, Apply for domain name: ***. It can support access to two domain names: http://***. and http://www.***.
Here is the series of program code:
<form action= method=post name=Frm onSubmit="return check_input()"> <br> <font color=red>Add * as required</font> <br>
The domain name you want to register:
http://<input name="nowurl" size=12
style=" BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt"> .
<br>
Your actual website address:
<input name="tourl" size=12
style=" BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt">
The title you requested to display:
<input name="company" size=12
style=" BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt">
<br>
<input type="submit" name="Submit" value=" Submit information " style="border:1px double rgb(88,88,88);font:9pt">
<input type="reset" name="Reset" value="Refill in "style="border:1px double rgb(88,88,88);font:9pt">
</p>
</form>
Add a record page
<!--#include file=""-->
<!--#include file=""-->
<%
uID=("*****")
%>
<%
dim nowurl,tourl,company,along,pbkey
nowurl=trim(("nowurl"))+"."
nurl=trim(("nowurl"))
tourl=trim(("tourl"))
company=trim(("company"))
along=20
pbkey="www,sex,admin,w,ww,wwww,hacker,hack"
set rs=("")
sql="select * from dns where userid='"&uid&"'"
sql,conn,1,1
if not then
"Sorry, you have applied for a second-level domain name, and each user can only apply for one second-level domain name! <br>The second-level domain name you applied for is: http://"+rs("nowurl")
end if
set rs=("")
sql="select * from dns where nowurl='"&nowurl&"'"
sql,conn,1,1
if not then
"Sorry, the domain name you applied for: http://"+nowurl+" has been applied by other companies. Please apply for a domain name in addition."
end if
if len(nurl)>along then
"Sorry, the domain name you entered is too long, please re-enter"
end if
if instr(pbkey,nurl) then
"Sorry, the domain name you entered is not blocked by the administrator because it contains sensitive words. Please re-enter."
end if
'Judge the legality of characters
if instr(nurl,"~") or instr(nurl,"`") or instr(nurl,"/") or instr(nurl,"?") or instr(nurl,">") or instr(nurl,"<") or instr(nurl,";") or instr(nurl,":") or instr(nurl,"}") or instr(nurl,"{") or instr(nurl,")") or instr(nurl,"(") or instr(nurl,"*") or instr(nurl,"&") or instr(nurl,"^") or instr(nurl,"%") or instr(nurl,".") or instr(nurl,",") or instr(nurl,"'") or instr(nurl,"~") or instr(nurl,"!") or instr(nurl,"$") then
"Sorry, the domain name you entered contains illegal characters. Please re-enter. The following characters are illegal characters: <br>~ ` / ? > < ; : } { ) ( * & ^ % $ # @ ! "
end if
set rs=("")
sql="select * from ** where theid is null"
sql,conn,3,3
rs("userid")=uID
rs("nowurl")=nowurl
rs("tourl")=tourl
rs("company")=company
"Congratulations, the application is successful, you can use your domain name immediately: http://"+nowurl
%>
Domain name desorption program:
<!--#include file=""-->
<%
dim geturl
geturl=replace(("HTTP_HOST"),"www.","")
set rs=("")
sql="select * from tb where nowurl='"&geturl&"'"
sql,conn,1,1
if then
"http:///"
else
dim tourl,company
tourl=rs("tourl")
company=rs("company")
%>
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<META CONTENT="text/html; CHARSET=UTF-8" HTTP-EQUIV="Content-Type">
<TITLE><% =company %></TITLE>
</HEAD>
<frameset frameborder="0" framespacing="0" scrolling="no" border="0" marginheight="0" marginwidth="0" rows="0,*">
<frame scrolling="NO" noresize="0" marginwidth="0" marginheight="0" framespacing="0" frameborder="0" target="main" name="main" SRC="about:blank">
<frame scrolling="yes" noresize="0" marginwidth="0" marginheight="0" framespacing="0" frameborder="0" target="main" name="main" SRC="<% =tourl %>">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p></body>
</noframes>
</frameset>
</HTML>
<% end if %>
To achieve the effect of a second-level name, the conditions and procedures must be taken:
1. There must be a top-level domain name, and this domain name must be parsed well and pointed well.
2. There must be an independent server. The general resolved domain name points to the server.
3. Create an empty host header web site in IIS on the server.
4. Set the default page to your second machine parsing program (for example:)
5. Second-level domain name series programs (including application page:, add page, parsing page,)
Advantages of this program:
a. Can limit the sensitive words of the domain name application, such as hacker, www, sex, china, etc.
b. Illegal words that can be restricted from applying for domain names, such as:! ·#¥%…—*()——? '"/wait
c, Only one domain name can be applied for per address.
d. Limit the length of the domain name applied.
e. If no one applies for the domain name the user visits, go to a specific page.
f, Apply for domain name: ***. It can support access to two domain names: http://***. and http://www.***.
Here is the series of program code:
<form action= method=post name=Frm onSubmit="return check_input()"> <br> <font color=red>Add * as required</font> <br>
The domain name you want to register:
http://<input name="nowurl" size=12
style=" BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt"> .
<br>
Your actual website address:
<input name="tourl" size=12
style=" BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt">
The title you requested to display:
<input name="company" size=12
style=" BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt">
<br>
<input type="submit" name="Submit" value=" Submit information " style="border:1px double rgb(88,88,88);font:9pt">
<input type="reset" name="Reset" value="Refill in "style="border:1px double rgb(88,88,88);font:9pt">
</p>
</form>
Add a record page
<!--#include file=""-->
<!--#include file=""-->
<%
uID=("*****")
%>
<%
dim nowurl,tourl,company,along,pbkey
nowurl=trim(("nowurl"))+"."
nurl=trim(("nowurl"))
tourl=trim(("tourl"))
company=trim(("company"))
along=20
pbkey="www,sex,admin,w,ww,wwww,hacker,hack"
set rs=("")
sql="select * from dns where userid='"&uid&"'"
sql,conn,1,1
if not then
"Sorry, you have applied for a second-level domain name, and each user can only apply for one second-level domain name! <br>The second-level domain name you applied for is: http://"+rs("nowurl")
end if
set rs=("")
sql="select * from dns where nowurl='"&nowurl&"'"
sql,conn,1,1
if not then
"Sorry, the domain name you applied for: http://"+nowurl+" has been applied by other companies. Please apply for a domain name in addition."
end if
if len(nurl)>along then
"Sorry, the domain name you entered is too long, please re-enter"
end if
if instr(pbkey,nurl) then
"Sorry, the domain name you entered is not blocked by the administrator because it contains sensitive words. Please re-enter."
end if
'Judge the legality of characters
if instr(nurl,"~") or instr(nurl,"`") or instr(nurl,"/") or instr(nurl,"?") or instr(nurl,">") or instr(nurl,"<") or instr(nurl,";") or instr(nurl,":") or instr(nurl,"}") or instr(nurl,"{") or instr(nurl,")") or instr(nurl,"(") or instr(nurl,"*") or instr(nurl,"&") or instr(nurl,"^") or instr(nurl,"%") or instr(nurl,".") or instr(nurl,",") or instr(nurl,"'") or instr(nurl,"~") or instr(nurl,"!") or instr(nurl,"$") then
"Sorry, the domain name you entered contains illegal characters. Please re-enter. The following characters are illegal characters: <br>~ ` / ? > < ; : } { ) ( * & ^ % $ # @ ! "
end if
set rs=("")
sql="select * from ** where theid is null"
sql,conn,3,3
rs("userid")=uID
rs("nowurl")=nowurl
rs("tourl")=tourl
rs("company")=company
"Congratulations, the application is successful, you can use your domain name immediately: http://"+nowurl
%>
Domain name desorption program:
<!--#include file=""-->
<%
dim geturl
geturl=replace(("HTTP_HOST"),"www.","")
set rs=("")
sql="select * from tb where nowurl='"&geturl&"'"
sql,conn,1,1
if then
"http:///"
else
dim tourl,company
tourl=rs("tourl")
company=rs("company")
%>
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<META CONTENT="text/html; CHARSET=UTF-8" HTTP-EQUIV="Content-Type">
<TITLE><% =company %></TITLE>
</HEAD>
<frameset frameborder="0" framespacing="0" scrolling="no" border="0" marginheight="0" marginwidth="0" rows="0,*">
<frame scrolling="NO" noresize="0" marginwidth="0" marginheight="0" framespacing="0" frameborder="0" target="main" name="main" SRC="about:blank">
<frame scrolling="yes" noresize="0" marginwidth="0" marginheight="0" framespacing="0" frameborder="0" target="main" name="main" SRC="<% =tourl %>">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p></body>
</noframes>
</frameset>
</HTML>
<% end if %>