/    Sign up×
Community /Pin to ProfileBookmark

hey is it possible 2 my block a certain ip from viewing my website?

to post a comment
Full-stack Developer

4 Comments(s)

Copy linkTweet thisAlerts:
@pcthugDec 31.2006 — 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:
<i>
</i>order allow,deny
deny from 127.0.0.1
allow from all

Now replace the psuedo-ip [FONT=Courier New]127.0.0.1[/FONT] with the IP address you wish to deny access to your site.

Save as [FONT=Courier New].htaccess[/FONT] (yes, no filename just an extension) and upload to your server's root directory.
Copy linkTweet thisAlerts:
@felgallDec 31.2006 — .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.
Copy linkTweet thisAlerts:
@chrismartzDec 31.2006 — 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.
Copy linkTweet thisAlerts:
@poolshark49authorJan 01.2007 — 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??
×

Success!

Help @poolshark49 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...