Merge pull request #55 from qkqpttgf/master

pull
pull/98/head
Mr.Lin 2020-03-24 21:46:01 +08:00 committed by GitHub
commit 4ad115b1e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,7 @@ RewriteRule ^(.*) index.php?/$1 [L]
# nginx # nginx
# rewrite ^(.*) /index.php?/$1 last; # rewrite ^(.*) /index.php?/$1 last;
# #
# caddy (not sure) # caddy
# rewrite { # rewrite {
# to index.php?/$1 # to index.php?/$1
# } # }

View File

@ -159,7 +159,7 @@ function install()
function checkrewrite() function checkrewrite()
{ {
url=location.protocol + "//" + location.host; url=location.protocol + "//" + location.host;
if (location.port!="") url += ":" + location.port; //if (location.port!="") url += ":" + location.port;
url += location.pathname; url += location.pathname;
if (url.substr(-1)!="/") url += "/"; if (url.substr(-1)!="/") url += "/";
url += "config.php"; url += "config.php";
@ -170,13 +170,12 @@ function install()
xhr4.send(null); xhr4.send(null);
xhr4.onload = function(e){ xhr4.onload = function(e){
console.log(xhr4.responseText+","+xhr4.status); console.log(xhr4.responseText+","+xhr4.status);
//filename = JSON.parse(xhr4.responseText);
if (xhr4.status==201) { if (xhr4.status==201) {
document.getElementById("checkrewritebtn").style.display = "none"; document.getElementById("checkrewritebtn").style.display = "none";
document.getElementById("submitbtn").disabled = false; document.getElementById("submitbtn").disabled = false;
document.getElementById("formdiv").style.display = ""; document.getElementById("formdiv").style.display = "";
} else { } else {
alert(xhr4.status); alert(url+"\n"+xhr4.status);
} }
} }
} }