Posted on November 22nd, 2006
8686 views IP Banning / Restriction Now I will show you, how you can Ban IP's from your site. You can even ban ALL except your own, or just ban every IP. This is very simple! Ban a certain IP: order allow,deny deny from xxx.xx.xx.xx allow from all Just change xxx.xx.xx.xx to the IP you want to ban. You can add multiple bans like this: order allow,deny deny from xxx.xx.xx.xx deny from xxx.xx.xx.xx deny from xxx.xx.xx.xx deny from xxx.xx.xx.xx allow from all again changing xxx.xx.xx.xx to the IP you want to ban. Explanation: order allow,deny - The order you want it to run.. the allow or the deny first deny from xxx.xx.xx.xx - Deny from a certain IP allow from all allow from all, except the ones defined to deny Now you can use other such as: allow from xxx.xx.xx.xx - Allow from a certain IP deny from all - deny from all, except the ones defined to allow. Its really easy, your just simple changing allow and deny around. Have a play yourself. You will find the code for this, in the ZIP at the end of the tutorial.
|