logo


Oferta Black Friday

  •  99,9%Program de funcționare
  •  Certificat SSL gratuit
  •  24/7 asistenţă live
  •  30 de zile banii înapoi garantat
Începe

Până la

90

%

OFF

02
ZILE
16
ORE
51
MINUTE
07
SECUNDE
Oferta Black Friday: Găzduire web
De la 0,59€ /Lună!
Vezi Toate Ofertele
×

Baza de cunoștințe

Găseşte articole despre caracteristici, ghiduri de depanare,
şi alte informaţii tehnice referitoare la serviciile de găzduire Hostinger.

How to block IP using .htaccess file?

Modificat la:
htaccess country blocked block IP IP block

You may block access to your website from specific IP addresses using .htaccess file.

You need to create this file in your public_html folder and add these example lines:

order allow,deny deny from 127.0.0.1 allow from all 

These lines will block access for all users using 127.0.0.1 IP address. Just change the 127.0.0.1 to the IP you want to block.

You can download the list of each country IPs from following link: https://www.countryipblocks.net/country_selection.php