It doesn't take very long before some users start becoming a problem for
the website itself.. to get rid of these type of users you can ban them
by IP - ofcourse they can hide behind proxy, but here's an ways to
block users from your website, for this you need access to .htaccess
file. Most host give you the access, if you don't see no file, create
one! .htaccess is a configuration file for apache! don't confuse it with
php.ini file which's for PHP.
Type this in .htaccess file and restart your server(if it's localhost) if it's up in cloud just refresh the page for test!
deny from all IP.AD.D.RE.SS
And you're done! MAGIC!? To ban multiple IP's you can repeat the statement.
Wanna see it in action? Here:
What about trying it on localhost? Save .htaccess file with this:
No comments:
Post a Comment