مرکز آموزش

آموزش ایجاد فایل htaccess جهت دسترسی فقط ایران به وبسایت پرینت

  • 2

شاید شما مایل باشید به غیر از کشور ایران هیچ کشور دیگری به وب سایت شما دسترسی نداشته باشد برای اینکار میتوانید هم از فایروال استفاده کنید و هم از یک فایل htaccess. و در اینجا ما از فایل اچ تی اکسس استفاده میکنیم.
دستورات زیر را کافی است در فایل htaccess. سایت خود کپی نمایید:
 

#COUNTRY_BLOCK_START

order deny,allow
allow from 2.144.0.0/14
allow from 2.176.0.0/10
allow from 2.240.0.0/12
allow from 12.130.88.0/24
allow from 46.28.72.0/21
allow from 46.32.0.0/19
allow from 46.34.96.0/19
allow from 46.34.160.0/19
allow from 46.36.96.0/19
allow from 46.100.0.0/16
allow from 62.32.35.32/26
allow from 62.32.35.96/27
allow from 62.32.49.128/26
allow from 62.32.49.192/27
allow from 62.32.49.224/29
allow from 62.32.49.240/24
allow from 62.32.50.240/28
allow from 62.32.53.64/26
allow from 62.32.53.168/29
allow from 62.32.53.224/28
allow from 62.32.61.96/27
allow from 62.32.61.224/27
allow from 62.32.63.128/26
allow from 62.60.128.0/17
allow from 62.68.82.64/26
allow from 62.145.88.0/24
allow from 62.145.89.0/25
allow from 62.145.89.128/27
allow from 62.145.89.192/26
allow from 62.145.92.128/25
allow from 62.145.96.0/22
allow from 62.145.109.0/24
allow from 62.193.0.0/19
allow from 62.220.96.0/19
allow from 63.243.185.0/24
allow from 64.182.7.161/29
allow from 67.192.143.0/26
allow from 67.223.99.240/28
allow from 69.13.185.223/29
allow from 69.13.185.231/32
allow from 77.36.128.0/17
allow from 77.67.32.0/24
allow from 77.77.64.0/18
allow from 77.95.219.0/23
allow from 77.104.64.0/18
allow from 77.237.64.0/19
allow from 77.237.160.0/19
allow from 77.245.224.0/20
allow from 78.38.0.0/15
allow from 78.109.192.0/20
allow from 78.110.112.0/20
allow from 78.111.0.0/23
allow from 78.111.2.8/28
allow from 78.111.2.32/26
allow from 78.111.2.136/29
allow from 78.111.2.160/28
allow from 78.111.3.0/21
allow from 78.111.11.0/23
allow from 78.111.13.64/26
allow from 78.111.14.0/24
allow from 78.111.15.0/27
allow from 78.111.15.32/29
allow from 78.154.32.0/19
allow from 78.157.32.0/19
allow from 78.158.160.0/19
allow from 79.127.0.0/17
allow from 79.132.192.0/19
allow from 79.170.144.0/21
allow from 79.175.128.0/19
allow from 79.175.160.0/22
allow from 79.175.164.0/24
allow from 79.175.166.0/20
allow from 79.175.182.0/21
allow from 79.175.190.0/23
allow from 80.66.176.0/20
allow from 80.69.240.0/20
allow from 80.71.112.0/20
allow from 80.75.0.0/20
allow from 80.78.135.128/25
allow from 80.191.0.0/16
allow from 80.231.68.0/24
allow from 80.242.0.0/20
allow from 80.253.128.0/19
allow from 81.12.0.0/17
allow from 81.28.32.0/19
allow from 81.29.240.0/20
allow from 81.31.160.0/19
allow from 81.90.144.0/20
allow from 81.91.128.0/19
allow from 82.99.192.0/18
allow from 82.115.0.0/20
allow from 82.115.16.0/22
allow from 82.115.20.0/23
allow from 82.138.140.0/25
allow from 82.205.129.0/27
allow from 82.205.143.192/26
allow from 82.205.152.128/25
allow from 82.205.153.32/25
allow from 82.205.153.160/28
allow from 82.205.153.240/28
allow from 82.205.155.0/24
allow from 82.205.156.0/25
allow from 82.205.156.128/32
allow from 82.205.156.192/24
allow from 82.205.157.192/26
allow from 82.205.159.96/26
allow from 82.205.159.160/27
allow from 82.205.159.224/27
allow from 82.205.166.0/24
allow from 82.205.170.112/27
allow from 82.205.170.192/27
allow from 82.205.172.32/27
allow from 82.205.176.72/29
allow from 82.205.181.0/26
allow from 82.205.181.128/27
allow from 82.205.209.112/28
allow from 82.205.219.32/28
allow from 82.205.226.0/26
allow from 82.205.226.96/28
allow from 83.147.192.0/18
allow from 83.170.23.0/29
allow from 83.170.26.0/24
allow from 83.170.33.0/27
allow from 83.170.34.96/27
allow from 83.170.34.160/26
allow from 83.170.41.192/26
allow from 83.170.43.128/27
allow from 83.170.43.224/28
allow from 83.170.43.240/29
allow from 83.170.43.248/30
allow from 83.170.43.252/31
allow from 83.170.43.254/32
allow from 83.170.45.64/27
allow from 83.170.45.160/27
allow from 83.170.46.64/27
allow from 83.170.46.128/27
allow from 83.170.46.192/27
allow from 83.170.47.32/27
allow from 83.170.48.160/27
allow from 83.170.49.64/27
allow from 83.170.49.224/26
allow from 83.170.50.32/27
allow from 83.170.50.128/26
allow from 83.170.52.0/25
allow from 83.170.52.152/29
allow from 83.170.52.230/32
allow from 84.11.2.0/24
allow from 84.11.13.0/27
allow from 84.11.13.232/29
allow from 84.11.14.64/28
allow from 84.11.14.200/29
allow from 84.11.15.0/24
allow from 84.11.25.0/27
allow from 84.11.25.96/27
allow from 84.11.25.192/27
allow from 84.11.26.64/27
allow from 84.11.27.32/27
allow from 84.11.28.32/26
allow from 84.11.28.96/27
allow from 84.11.29.32/26
allow from 84.11.29.96/27
allow from 84.11.30.176/27
allow from 84.11.30.216/29
allow from 84.11.30.247/32
allow from 84.11.30.249/32
allow from 84.11.31.32/26
allow from 84.11.31.96/27
allow from 84.11.31.160/25
allow from 84.11.32.64/25
allow from 84.11.34.0/25
allow from 84.11.34.192/24
allow from 84.11.35.192/26
allow from 84.11.36.128/27
allow from 84.11.36.192/26
allow from 84.11.37.0/27
allow from 84.11.37.128/27
allow from 84.11.38.0/26
allow from 84.11.38.96/27
allow from 84.11.39.32/26
allow from 84.11.40.0/25
allow from 84.11.42.0/24
allow from 84.11.43.0/27
allow from 84.11.45.32/28
allow from 84.11.56.0/27
allow from 84.11.57.0/27
allow from 84.11.57.160/27
allow from 84.11.60.192/26
allow from 84.11.62.0/23
allow from 84.11.67.96/27
allow from 84.11.68.0/23
allow from 84.11.70.0/25
allow from 84.11.71.128/26
allow from 84.11.72.48/28
allow from 84.11.72.128/25
allow from 84.11.73.96/27
allow from 84.11.74.0/27
allow from 84.11.74.160/27
allow from 84.11.74.224/27
allow from 84.11.75.128/26
allow from 84.11.75.224/24
allow from 84.11.76.224/27
allow from 84.11.77.96/26
allow from 84.11.77.192/27
allow from 84.11.77.224/28
allow from 84.11.77.240/29
allow from 84.11.77.248/30
allow from 84.11.77.252/31
allow from 84.11.77.254/32
allow from 84.11.80.192/26
allow from 84.11.85.0/27
allow from 84.11.110.128/28
allow from 84.47.196.0/21
allow from 84.47.204.0/22
allow from 84.47.208.0/23
allow from 84.47.210.0/24
allow from 84.47.212.0/19
allow from 84.47.244.0/21
allow from 84.47.252.0/22
allow from 84.241.0.0/18
allow from 84.246.65.0/24
allow from 84.246.71.128/28
allow from 84.246.71.168/29
allow from 84.246.71.176/32
allow from 85.9.64.0/18
allow from 85.15.0.0/18
allow from 85.93.3.67/30
allow from 85.93.4.80/29
allow from 85.93.4.88/31
allow from 85.93.18.92/30
allow from 85.93.18.96/31
allow from 85.93.18.98/32
allow from 85.133.128.0/17
allow from 85.185.0.0/16
allow from 85.198.0.0/18
allow from 85.236.144.0/20
allow from 86.57.0.0/17
allow from 86.62.1.88/29
allow from 86.109.32.0/19
allow from 87.107.0.0/16
allow from 87.247.160.0/19
allow from 87.248.128.0/19
allow from 88.135.32.0/20
allow from 89.144.128.0/18
allow from 89.165.0.0/17
allow from 89.184.192.0/29
allow from 89.184.208.0/23
allow from 89.184.211.0/21
allow from 89.184.219.0/22
allow from 89.184.223.0/24
allow from 89.221.80.0/20
allow from 89.235.64.0/18
allow from 91.98.0.0/15
allow from 91.184.64.0/19
allow from 91.186.192.0/19
allow from 91.206.122.0/23
allow from 91.207.138.0/23
allow from 91.208.165.0/24
allow from 91.209.242.0/24
allow from 91.212.16.0/24
allow from 91.212.19.0/24
allow from 91.212.252.0/24
allow from 91.216.4.0/24
allow from 91.217.64.0/23
allow from 91.220.79.0/24
allow from 92.42.48.0/21
allow from 92.50.0.0/18
allow from 92.61.176.0/20
allow from 92.62.176.0/20
allow from 92.242.192.0/19
allow from 93.110.0.0/16
allow from 93.126.0.0/18
allow from 93.190.24.0/21
allow from 94.74.128.0/18
allow from 94.101.128.0/21
allow from 94.101.176.0/20
allow from 94.101.240.0/20
allow from 94.124.99.0/23
allow from 94.124.101.0/24
allow from 94.139.160.0/19
allow from 94.182.0.0/15
allow from 94.184.0.0/16
allow from 94.232.168.0/21
allow from 94.241.128.0/18
allow from 95.38.0.0/16
allow from 95.80.128.0/18
allow from 95.81.64.0/18
allow from 95.82.0.0/17
allow from 95.130.56.0/21
allow from 95.130.240.0/21
allow from 95.142.224.0/20
allow from 109.72.192.0/20
allow from 109.74.224.0/20
allow from 109.95.56.0/20
allow from 109.109.32.0/19
allow from 109.110.160.0/19
allow from 109.111.32.0/19
allow from 109.122.192.0/18
allow from 109.125.128.0/18
allow from 109.162.128.0/17
allow from 109.201.0.0/19
allow from 109.203.160.0/19
allow from 109.225.128.0/18
allow from 109.230.64.0/18
allow from 109.238.176.0/20
allow from 109.239.0.0/20
allow from 173.224.114.160/27
allow from 178.21.40.0/21
allow from 178.22.72.0/21
allow from 178.131.0.0/16
allow from 178.157.0.0/18
allow from 178.173.128.0/17
allow from 178.215.0.0/18
allow from 178.219.224.0/20
allow from 178.236.32.0/20
allow from 178.236.229.33/26
allow from 178.236.229.97/27
allow from 178.236.230.0/25
allow from 178.236.230.128/32
allow from 178.238.192.0/20
allow from 178.239.144.0/20
allow from 178.248.40.0/21
allow from 178.251.208.0/21
allow from 178.252.128.0/18
allow from 178.253.0.0/18
allow from 188.34.0.0/16
allow from 188.75.64.0/18
allow from 188.93.64.0/21
allow from 188.118.64.0/18
allow from 188.121.96.0/18
allow from 188.125.64.0/21
allow from 188.126.128.0/19
allow from 188.136.128.0/17
allow from 188.138.38.64/27
allow from 188.158.0.0/15
allow from 193.19.128.0/22
allow from 193.34.197.128/25
allow from 193.104.212.0/24
allow from 193.105.2.0/24
allow from 193.105.6.0/24
allow from 193.189.122.0/23
allow from 193.218.205.64/26
allow from 193.252.129.0/24
allow from 193.252.131.0/24
allow from 193.252.135.0/23
allow from 194.73.51.160/28
allow from 194.133.20.208/29
allow from 194.133.88.0/27
allow from 194.143.140.0/23
allow from 194.146.148.0/22
allow from 194.146.164.0/22
allow from 194.225.0.0/18
allow from 194.225.64.0/19
allow from 194.225.96.0/20
allow from 194.225.112.0/21
allow from 194.225.121.0/17
allow from 194.225.249.0/22
allow from 194.225.253.0/23
allow from 194.225.255.0/24
allow from 195.10.11.0/24
allow from 195.10.15.160/28
allow from 195.27.14.0/29
allow from 195.96.139.16/28
allow from 195.96.147.0/23
allow from 195.96.149.0/24
allow from 195.110.38.0/23
allow from 195.146.32.0/19
allow from 195.170.163.0/24
allow from 195.191.74.0/23
allow from 195.211.44.0/22
allow from 195.213.219.0/28
allow from 195.219.71.0/24
allow from 195.219.129.128/25
allow from 195.245.70.0/23
allow from 196.3.91.0/24
allow from 204.15.197.0/28
allow from 204.15.199.112/29
allow from 206.222.21.72/29
allow from 206.222.23.168/29
allow from 208.115.112.152/29
allow from 209.18.107.150/29
allow from 209.18.107.158/31
allow from 209.28.123.0/26
allow from 209.239.127.0/27
allow from 210.5.196.64/26
allow from 210.5.197.64/26
allow from 210.5.198.32/29
allow from 210.5.198.64/28
allow from 210.5.198.96/25
allow from 210.5.204.0/25
allow from 210.5.205.0/26
allow from 210.5.208.0/26
allow from 210.5.208.128/24
allow from 210.5.218.64/25
allow from 210.5.218.192/26
allow from 210.5.232.0/25
allow from 210.5.233.0/25
allow from 210.5.233.128/26
allow from 212.6.37.0/23
allow from 212.6.41.0/25
allow from 212.6.42.0/24
allow from 212.6.45.0/24
allow from 212.6.47.0/22
allow from 212.6.55.112/28
allow from 212.6.60.0/23
allow from 212.6.62.0/24
allow from 212.16.64.0/19
allow from 212.33.192.0/19
allow from 212.44.196.0/25
allow from 212.44.197.0/24
allow from 212.44.223.0/24
allow from 212.50.224.0/19
allow from 212.73.92.252/30
allow from 212.80.0.0/20
allow from 212.80.16.0/21
allow from 212.80.24.0/22
allow from 212.80.28.0/24
allow from 212.80.30.0/23
allow from 212.86.64.0/19
allow from 212.95.128.0/19
allow from 212.120.192.0/19
allow from 213.109.240.0/20
allow from 213.147.128.0/19
allow from 213.176.0.0/17
allow from 213.195.0.0/18
allow from 213.207.192.0/18
allow from 213.217.32.0/19
allow from 213.233.160.0/19
allow from 216.55.163.116/29
allow from 217.11.16.0/21
allow from 217.11.24.0/22
allow from 217.11.28.0/27
allow from 217.11.28.32/28
allow from 217.11.28.48/29
allow from 217.11.28.64/23
allow from 217.11.30.64/24
allow from 217.11.31.64/25
allow from 217.11.31.192/26
allow from 217.24.146.0/24
allow from 217.24.148.0/21
allow from 217.24.156.0/22
allow from 217.25.48.0/20
allow from 217.64.144.0/20
allow from 217.66.192.0/19
allow from 217.146.191.48/25
allow from 217.146.191.176/26
allow from 217.146.191.240/28
allow from 217.146.208.0/20
allow from 217.161.16.0/23
allow from 217.170.240.0/20
allow from 217.171.191.220/30
allow from 217.172.96.0/22
allow from 217.172.100.0/23
allow from 217.172.103.0/21
allow from 217.172.111.0/22
allow from 217.172.115.0/23
allow from 217.172.117.0/24
allow from 217.172.120.0/24
allow from 217.174.16.0/20
allow from 217.218.0.0/15
deny from all

#COUNTRY_BLOCK_END

 


آیا این پاسخ به شما کمک کرد؟
بازگشت