Previously wrote a website to automatically build the station system. But recently to write a do not automatically generated, but to do:
http://www.knowsky.com/ User name
So I want a user to create a directory. But I think if the W user. That's not what I want to build on the W directory.
So I used IIS 404 error and Analysis of the error message to write an automatic steering code.
First, all 404 IIS Errors. Point to: Url:/website.asp?webname= $V
Then create one below the root directory of the Web site:
Website.asp
The contents of the-----------------are as follows-------------------'
<%@ codepage = "936"%>
<!--#include file= "conn/dbconn.asp"-->
<%
Webname=trim (Request.QueryString ("WebName"))
Webname=right (Webname,len (WebName)-instr (WebName, "80")-2)
Set rs = Conn.execute ("Select ID from Qyml where user= '" &WebName& ")
If Rs.eof Then
Response.Write ("File not found!")
Else
Response.Redirect ("/show/index.asp?id=" &rs ("id"))
End If
%>
'------------------------------------------------'
OK, fully implemented, do not have to create more than n directories.