在此login page中,当有人单击“ Accedi”按钮时,将调用login_user.php文件。调用通过$.post()
JQuery方法进行。
这是电话:
username = $('#username').val();
password = $('#password').val();
$.post("./function/login_student.php", {
username:username,
password:password
},
function (data){
var array = $.parseJSON(data);
if(array.error == "1" || array.not_present == "1"){
$('#alertLogin').addClass('alert-danger').text('Ti preghiamo di controllare i campi').show(0).delay(5000).hide(0);
}
else if(array.not_active == "1"){
$('#alertLogin').addClass('alert-danger').text('Ti preghiamo di verificare il tuo account').show(0).delay(5000).hide(0);
}
else{
let username_studente = array.username_studente;
$(location).attr('href','student.php?username=' + username_studente);
}
}
);
当我看到错误时,我认为问题是URL,但我也尝试使用此URL https://www.make-it-happen.it/function/login_student.php
,但问题仍然存在
问题是用于删除php扩展文件的代码:
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R=302,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]
如何以隐藏扩展名且Mixed content
没有问题的方式解决问题?