/ms -> /mc.html x /mc -> /mc/
This commit is contained in:
@@ -8,7 +8,12 @@ class C(H):
|
||||
def do_GET(self):
|
||||
p = self.path
|
||||
if p.endswith("/"):
|
||||
p += "index.html"
|
||||
base_path = p.rstrip("/")
|
||||
html_file = base_path + ".html"
|
||||
if os.path.exists(os.path.join(os.getcwd(), html_file.lstrip("/"))):
|
||||
p = html_file
|
||||
else:
|
||||
p += "index.html"
|
||||
elif "." not in p.split("/")[-1]:
|
||||
r = os.path.join(os.getcwd(), p.lstrip("/"))
|
||||
if os.path.exists(r + ".html"):
|
||||
|
||||
Reference in New Issue
Block a user