Apache主机利用.htaccess抵御网站攻击的常用方法
Apache的.htaccess禁止访问指定扩展名
<FilesMatch (.*)\.(asp|mdb|ashx|aSpX|jsp|tar.gz|asa|exe|bat|bak|com|sql|zip|rar|7z|cab|jar|tar|gz|iso|bz2|z)$> Order allow,deny deny from all </FilesMatch>
Apache的.htaccess禁止指定ip/ip段访问
Order Deny,Allow Deny from 123.131.145.78 123.126.113.17 117.136.40.181 60.165.238.223 101.91.60.106 119.79.101.14 124.126.1.20 123.126.68.140 223.71.46.31 223.104.105.99 223.104.248.14 117.136.0.244 222.132.30.202 113.5.3.235 121.69.51.202
113.128.105 221.213.75.141 113.128.104 58.56.96.54 123.196.129.95 210.16.189.4 182.138.163 182.138.162 58.245.27.198 125.118.6.181 60.186.29.230 60.186.193.206 115.198.203.134 122.235.191.126 113.128.105.214 27.224.137
182.138.214.68 182.138.215 218.85.33 119.186.39.2
Apache的.htaccess指定目录访问跳转到首页
RewriteEngine On RewriteBase / Redirect permanent /jinbu/ http://meitianjinbu.cn/
欢迎访问每天进步网:https://meitianjinbu.cn/