2022-02-14 21:43:12 +00:00
|
|
|
def main():
|
|
|
|
def handleHTTP(event,eenv,env):
|
|
|
|
env["htaccessPropagate"] = True
|
|
|
|
paths = [indexPath] + env["lPath"].split(os.path.sep)[:-1]
|
|
|
|
pathl = []
|
|
|
|
for pathbit in paths:
|
|
|
|
pathl.append(pathbit)
|
2022-02-14 22:54:20 +00:00
|
|
|
pathle = pathl + [".fhtpyaccess"]
|
|
|
|
path = p(*pathle)
|
2022-02-14 21:43:12 +00:00
|
|
|
if not os.path.isfile(path): continue
|
|
|
|
handlePYP(env,path)
|
|
|
|
if env["htaccessPropagate"] == False:
|
|
|
|
return True
|
|
|
|
|
|
|
|
addEventHandler("handleHTTP",handleHTTP)
|
|
|
|
|
|
|
|
main()
|
|
|
|
fileHandlers["fhtpyaccess"] = handle404
|
|
|
|
fileHandlers["htaccess"] = handle404
|