Update site.py

fix bugs
This commit is contained in:
jd82k
2025-02-20 22:40:07 -08:00
committed by GitHub
parent 6ca80e3d8c
commit 1b0e42c79e
+1 -1
View File
@@ -1376,7 +1376,7 @@ class sites(object):
if _keep_path == 1:
_to = "{}$request_uri".format(to)
redirect_type = "301" if _type_code == 0 else "302"
redirect_type = "301" if _r_type == 0 else "302"
_if = "if ($host ~ '^{}')".format(site_from)
_return = "return {} {}; ".format(redirect_type, to)
file_content = _if + "{\r\n " + _return + "\r\n}"