HTTP authentication ile wp-login.php'ye küçükte olsa bir koruma sağlayabiliriz.
Aşağıda vericeğim kodları wp-login.php'nin tepesine eklemeniz yeterli.
İsteğe göre "root" ve "root"'yide değiştirebilirsiniz.
Herhangi bir çalışmama durumunda bildirirseniz hataları düzeltmeye çalışırım.
|
$auth_ok = 0; if ($_SERVER['PHP_AUTH_USER'] == "root" && $_SERVER['PHP_AUTH_PW'] == "root") { $auth_ok = 1; } if (!$auth_ok) { header('WWW-Authenticate: Basic realm="Only Authorized Persons"'); header('HTTP/1.0 401 Unauthorized'); echo "lorem ipsum dolar sit amet"; //Cancel'a bastiktan sonra ne yazicak ekran exit; }
|
0 yorum:
Yorum Gönder