Mobile app version of vmapp.org
Login or Join
Jessie594

: 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

@Jessie594

Posted in: #Htaccess #IpAddress

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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie594

1 Comments

Sorted by latest first Latest Oldest Best

 

@Murphy175

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme