Files
CyberPanel/websiteFunctions/tests.py

19 lines
360 B
Python
Raw Normal View History

2022-06-14 17:20:12 +05:00
a = "/home/folderhabitk.ml/public_html/subfile/"
2022-06-12 12:05:51 +05:00
DomainName ="newweb3.com"
abc = a.split("/")
wpexpath = abc[4]
2022-06-14 17:20:12 +05:00
b=a.rstrip('/')
c= b.rstrip(wpexpath)
2022-06-12 12:05:51 +05:00
newpath = '/home/%s/public_html/%s' % (DomainName, wpexpath)
2019-11-19 18:43:52 +05:00
2022-06-14 12:10:34 +05:00
if wpexpath != "":
home = "0"
else:
home = "1"
2022-06-14 17:20:12 +05:00
print(wpexpath)
print(c)
2022-06-15 17:39:06 +05:00
# furl = "habi.com/subfolder"
# a=furl[furl.find('/'):]
# print(a)