title: about blocking a country by using .htaccess
body: <p>I have tried many times, I feel desperate.
  I have been able to do this successfully before on Apache 2.2.
  Now my environment is Apache/2.4.18 (Ubuntu) Server</p>
  
  <p>I go to <a href="https://www.ip2location.com/blockvisitorsbycountry.aspx" rel="nofollow noreferrer">https://www.ip2location.com/blockvisitorsbycountry.aspx</a> to generate code</p>
  
  <ol>
  <li>select ipv4</li>
  <li>select China</li>
  <li>select "Apache 2.4 .htaccess deny"</li>
  </ol>
  
  <p>Then add the code to the bottom of <code>.htaccess</code>.</p>
  
  <p>However, the result is that I cannot access the website whether I use a VPN or not.</p>
  
  <p>I am located in China．</p>
  
  <p>Later, I tried to select another one country, such as Japan, to generate new blocking code.</p>
  
  <p>However, the result was the same, after adding the code into <code>.htaccess</code>.
  I also cannot access the website, even though the blocked country is Japan and I am in China.</p>
  
  <p>I doubt the code, what should I do in order to get the right blocking a country code? </p>
  
  <hr>
  
  <p>Some of the generated code:</p>
  
  <pre><code>&lt;RequireAll&gt;
  Require all granted
  Require not ip 1.0.1.0/24
  Require not ip 1.0.2.0/23
  Require not ip 1.0.8.0/21
  Require not ip 1.0.32.0/19
  Require not ip 1.1.0.0/24
  Require not ip 1.1.2.0/23
  Require not ip 1.1.4.0/22
  :
  </code></pre>