Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted July 19, 20195 yr I am trying to install a country ip blocking script to our forum to prevent access to countries like Cuba, Iran, North Korea, etc. I have tried including the php script with (include, require, require_once) but I cannot get it working on forum.altair.com without it throwing a 500 Internal Server Errors. It was attempting to load the file more than once despite that it was only being called out once. What would be the best practices for including php files that load first? Thank you for your help.
July 19, 20195 yr Community Expert Something like blocking IPs would be more beneficial on the server or network level. Have you contacted your hosting provider to see if they have a solution?
July 19, 20195 yr Author Well we are trying to block countries like Iran, North Korea, Cuba using an IP lookup service. So we are not blocking a known IP. How would the server do that without loading files in the www root?
July 19, 20195 yr Community Expert 43 minutes ago, Christine Barrett said: Well we are trying to block countries like Iran, North Korea, Cuba using an IP lookup service. So we are not blocking a known IP. How would the server do that without loading files in the www root? Various firewalls may have rules that you could take advantage of. CSF does allow you to block countries. Your hosting provider may have a better solution which is why I suggested getting in contact.
July 22, 20195 yr While I fundamentally agree with Jim's recommendation, if you are forced to include a script in the manner you are describing, your best bet would be to use a require_once() call from either conf_global.php or constants.php.
Archived
This topic is now archived and is closed to further replies.