Click to See Complete Forum and Search --> : blocking ip


poolshark49
12-31-2006, 02:16 AM
hey is it possible 2 my block a certain ip from viewing my website?

pcthug
12-31-2006, 02:40 AM
Provided you are running on an Apache-based server, you may use a htaccess file to deny defined IP addresses. Firstly paste the following code into your text-editor of choice:

order allow,deny
deny from 127.0.0.1
allow from all
Now replace the psuedo-ip 127.0.0.1 with the IP address you wish to deny access to your site.

Save as .htaccess (yes, no filename just an extension) and upload to your server's root directory.

felgall
12-31-2006, 03:34 PM
.htaccess isn't an extension, it is a filename without an extension. The . on the front is what tells Linux that it is a hidden file. It is only Windows that gets confused about the . and so you have to specify it as ".htaccess" in order to let windows know not to try to add an extension to it.

chrismartz
12-31-2006, 04:58 PM
I would suggest using any server side language to block an ip or ip range. You can do it with client-side scripting but that is easy to get around.

poolshark49
12-31-2006, 06:35 PM
idk how i;m going to get the ip address that i'm going 2 block is there a way figure it out if i'm talking 2 some 1 on myspace??