global handle404 def handle404(env): newPath = "/" + pathToURL(env["pathFixed"]) rawArgs = env["protocolHeaderList"][1].split("?",1) if len(rawArgs) > 1: newPath += "?" +rawArgs[-1] notFound(env["self"].connection,newPath)