Publishing System Settings Logout Login Register
Everything you need to know about .htaccess! Massive tutorial!
TutorialCommentsThe AuthorReport Tutorial
Tutorial Avatar
Rating
Add to Favorites
Posted on November 22nd, 2006
8408 views
General Website Development

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.

Next Page
Pages: 1 2 3 4 5 6 7 8 9 10
Dig this tutorial?
Thank the author by sending him a few P2L credits!

Send
Adam

This author is too busy writing tutorials instead of writing a personal profile!
View Full Profile Add as Friend Send PM
Pixel2Life Home Advanced Search Search Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Pixel2life Homepage Submit a Tutorial Publish a Tutorial Join our Forums P2L Marketplace Advertise on P2L P2L Website Hosting Help and FAQ Topsites Link Exchange P2L RSS Feeds P2L Sitemap Contact Us Privacy Statement Legal P2L Facebook Fanpage Follow us on Twitter P2L Studios Portal P2L Website Hosting Back to Top