Level 58
To ban a specific IP address from accessing a site on Forge, you can use the .htaccess file to block the IP address. Here's how you can do it:
- Connect to your server using SSH.
- Navigate to the root directory of your Forge site.
- Open the
.htaccessfile using a text editor. - Add the following code at the end of the file:
<RequireAll>
Require all granted
Require not ip 192.168.0.1
</RequireAll>
Replace 192.168.0.1 with the IP address you want to ban.
- Save the file and exit the text editor.
- Restart your web server for the changes to take effect.
This configuration will allow access to all IP addresses except the one you specified. Any requests coming from the banned IP address will be denied.
Note: Make sure you have a backup of your .htaccess file before making any changes.