1、
Select Case e.Path
Case "index.html","" ’已经做好的网页
‘index.html原来是什么代码,这个地方就是什么代码?如果不行请贴出自己写的完整代码说明问题
End Select
如果使用的是静态网页
Select Case e.Path
Case ""
e.Redirect("index.html")
End Select
2、
方法1、
添加一个根目录,比如d:\web,把WEB_80和WEB_5505都放入d:\web,启动服务设置【HttpServer.WebPath = "d:\web"】
然后80端口的通过这样访问:http://www.abc.com/WEB_80/index.html
然后5505端口的通过这样访问:http://www.abc.com:5505/WEB_5505/index.html
方法2、使用自定义事件头,去掉【HttpServer.WebPath = "d:\web"】
httprequest事件
Dim fl As String = "d:\web\WEB_80\" & e.path
if e.port = 5505 then
fl = "d:\web\WEB_5505\" & e.path
end if
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
'其它代码