Try using URL without index.php as index

pull/221/head
PiRSquared17 9 years ago
parent dec0032971
commit b1ce45b170

@ -1274,6 +1274,13 @@ def getParameters(params=[]):
index = index2
if index and index.startswith('//'):
index = args.wiki.split('//')[0] + index
if index and checkIndex(
index=index,
cookies=args.cookies,
session=session):
print 'index.php is OK'
else:
index = '/'.join(index.split('/')[:-1])
if index and checkIndex(
index=index,
cookies=args.cookies,
@ -1394,6 +1401,11 @@ def checkIndex(index=None, cookies=None, session=None):
raw) and not cookies:
print "ERROR: This wiki requires login and we are not authenticated"
return False
if re.search(
r'(page-Index_php|"wgPageName":"Index.php"|"firstHeading"><span dir="auto">Index.php</span>)',
raw):
print "Looks like the page called Index.php, not index.php itself"
return False
if re.search(
r'(This wiki is powered by|<h2 id="mw-version-license">|meta name="generator" content="MediaWiki)',
raw):

Loading…
Cancel
Save