<% on error resume next mypath = replace(request("loc"), ".htm", "") & ".htm" Set myfso = Server.createObject("Scripting.FileSystemObject") myfilepath = myfso.GetFolder(server.mappath("/Directions")) & "\" & replace(mypath, "/", "\") Set objFile = myfso.OpenTextFile(filepath) if Err.number <> 0 then ' response.redirect("index.asp?page=main") end if on error goto 0 if mypath = "" then ' response.redirect("index.asp?page=main") End If Server.Execute("/Directions/" & mypath) %>