How to Restrict/Block IP Address using .htaccess File?

In this tutorial I’m going to learn how to block any IP Address using .htaccess file so follow this tutorial we ‘have demonstrated in very easy way.

Example 1: Block One IP Address:

simply create .htaccess file in your root directory and add following code on it.

.htaccess

order deny,allow
deny from all
allow from 13.127.15.21

Next open below IP address in browser

13.127.15.21

Now IP address is block thanks for reading this 👍

Hi I am Amit Kumar Thakur Experienced as s Software Developer with a demonstrated history of working in the information technology and services industry. Skilled in HTML, CSS, Bootstrap4, PHP, Laravel-9 , REST API,FB API,Google API, Youtube Api, Bitbucket,Github,Linux and jQuery. Strong engineering professional focused in Computer/Information Technology Administration and Management. Currently my profile is to Software Developer, analyze the requirement, creating frame for web application, coding and maintenance.

Related Posts

How to Check Project Size in Linux ?

In this tutorial we’re going to learn how to check installed project size on Linux, so just copy below command and run your terminals. Output:-

How to Install Java on Linux?

Java Installation on windows using command in Linux. Output:-

How to check disk usage information in Linux?

In this tutorial im going to check how to check the disk usage information in linux using command. 1ste step :- Go to you directory which project…

Where is the actual data in a mysql db stored on a linux machine?

In this tutorial, we will discuss the standard practice of storing MySQL database files in Linux. By default, MySQL stores its data files in a specific directory,…

Failed to open stream: Permission denied in Linux

When I open website it showing Failed to open stream: Permission denied in linux ERROR: file_put_contents(/opt/lampp/htdocs/wizbrand/wz-account-admin-ms/storage/framework/views/b4a9ad9001102408b49e98f9f275b6c53d7cf011.php): Failed to open stream: Permission denied Solution just run below command

SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES) (SQL: select * from information_schema.tables where table_schema

When I run this code in server it showing error Solution:- step 1 – go to this directory wz-tools-ms-renew/bootstrap/cache and delete config.php Next go to .env and…

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x