Already I have share few guides on .htaccess. Here is a quick recap:
Blocking a specific visitor from specific IP is pretty easy and you can do it in easy step, just follow this how to guide and block a specific user in few steps.
Step1: Log-in into cPanel by typing URL (mentioned below) and click on “File Manager” as shown below:
http://www.domainname.com/cpanel (replace domain name by your own domain)
Step2: When you click on “File Manager” (in step 1), it open a new window (as shown below), i.e, root directory of your domain.
Step3: Now select .htaccess file and click on “Edit” option in navigation menu as shown below:
Step4: After clicking on “Edit” option in navigation menu, it open a new window as shown below:
Step5: Now copy this code and paste this code (in step 4) in .htaccess file.
<Limit GET POST PUT> order allow,deny allow from all deny from xx.xxx.xx.xxx </Limit>
Here xx.xxx.xx.xxx is the IP address of the person you want to block. You can replace this with your visitor IP address.
Step6: When you paste this code (code you get in step5) click on “Save” button as shown below:
Step7: Congratulations, you have successfully block visitors from specific IP address using .htaccess
If you have any query do let me know in comment section and don’t forget to like on Facebook so that you don’t miss any .htaccess tutorial.
If you like this post and find informative, don’t forget to share it on social networking sites.