: How to make Htaccess file call external IP block lists? Well, I don’t know if this is an easy thing to do, but I haven’t figured it out yet. Instead of continually updating my Htaccess
Well, I don’t know if this is an easy thing to do, but I haven’t figured it out yet. Instead of continually updating my Htaccess file with newly updated country IP block lists (because my htaccess file is now as long as a trip to the moon), I’d like to include some bit of code in the main htaccess to “call” different IP lists, so I can easily re-upload a newly updated country ip block list to a folder of blocked countries (i use www.ipdeny.com/ipblocks/ for my lists)
FOR EXAMPLE:
random website folder
random website folder
random website folder
.HTACCESS
Countryblocklist folder ------inside this folder ,
--->deny_nigeria.txt
--->deny_china.txt
--->deny_russia.txt
---->deny_any_other_country.txt
Can anyone help me out with what code I could use inside the Htaccess to be able to call these foldered ipblock txt files???
(and please no jibes at me blocking countries lol, i really need to for my business, as hundreds from these countries have been playing havoc with my site for years now, also I cant use geo-ip thing, as i use bluehost for hosting)
Cheers guys.
More posts by @Jessie594
1 Comments
Sorted by latest first Latest Oldest Best
There is no way to include external file for the block list. You can use include directive in httpd.conf only ,e.g.,
Order Deny,Allow
include conf/Countryblocklist/*
Allow from all
with Deny in each IP. It requires server restart on each update, so you should consider blocking with script.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.