Php 为什么我的网站有良好的防洪保护,在奇怪的情况下重定向?
我的php网站有以下防洪措施:Php 为什么我的网站有良好的防洪保护,在奇怪的情况下重定向?,php,session,web,client-side-attacks,Php,Session,Web,Client Side Attacks,我的php网站有以下防洪措施: <?php if (!isset($_SESSION)) { session_start(); } // anti flood protection if ($_SESSION['last_session_request'] > time() - 2){ // users will be redirected to this page if it makes requests faster than 2 seconds echo
<?php
if (!isset($_SESSION)) {
session_start();
}
// anti flood protection
if ($_SESSION['last_session_request'] > time() - 2){
// users will be redirected to this page if it makes requests faster than 2 seconds
echo "Stay out!";
exit;
}
$_SESSION['last_session_request'] = time();
?>
它工作得很好,因为网站在我添加后变得稳定(15天前),但有一个问题。要了解de问题,您可以访问网站attacked(),您将看到:
如果您在主页面或单击其中一篇文章,它会导航良好
但是
如果您进入Cronicas,Contactenos或Miembros部分,它会显示:滚开
我想了解它为什么会发生,如果可能的话,如何解决
谢谢。请执行以下步骤:
我认为你做错了。DDOS防护应在服务器级别而不是脚本级别。我可以禁用cookies,你可以点击你的网站任意次数,而不会出现问题。此外,机器人程序不会存储cookie,因此每次有新会话时都会存储cookie。我安装了mod_evasive和mod_security,但不起作用。你有什么服务器/控制面板?没有面板,我使用Amazon AWS使用shell、FTP客户端和MySQL客户端。但是没有面板,很明显Amazon AWS panel account.php不是您想要放置此类代码的地方,您想要在服务器级别停止它们,我建议使用psad。