mod_write chong bot va chong flood
File thu nhat -- .htaccess
// @file <a href="/taxonomy/term/204" title="">.htaccess</a> -- $Id$ ErrorDocument 403 /403.php RewriteEngine on # Debug HTTP_COOKIE <a href="/category/ph%C3%A2n-lu%E1%BB%93ng/apache.html" title="">Apache</a> variable RewriteRule .* - [E=INFO_HTTP_COOKIE:%{HTTP_COOKIE},NE] RewriteCond %{HTTP_COOKIE} !.*IS_NOT_BOT [NC] RewriteCond %{REQUEST_METHOD} ^GET$
File thu hai -- 403.php
<?php
// @file 403.php -- $Id$
if (!empty ($_POST) && isset ($_POST['REQUEST_URI'])) {
setcookie('IS_NOT_BOT');
header('Location: '. $_POST['REQUEST_URI'], TRUE, $http_response_code);
// print_r ($_SERVER['INFO_HTTP_COOKIE']); // print out <a href="/category/ph%C3%A2n-lu%E1%BB%93ng/apache.html" title="">Apache</a> HTTP_COOKIE value
exit ();
}
?><html>
<head>
</head>
<body>
<form action="<?=$_SERVER['SCRIPT_NAME']?>" method="POST">
<input type="submit" value="Continue..." />
<input type="hidden" name="REQUEST_URI" value="<?=$_SERVER['REQUEST_URI']?>"/>
</form>
</body></html>
?>Tham khao:
[1] Crazy Advanced mod_rewrite Tutorial
The Hong
Comments
Co' Phai Toila admin MotViSao.com ko ?? ^^!
Vo tinh thay domain nay, co phia Toila admin MotViSao.com ko ? co phai Toila ko ?? Thai vui ghe zu ji cung mail thai 1 tieng nha
Post new comment