title: How to block wordpress admin by htaccess
body: <p>I was trying to block the access from public to my /wp-admin. I can achieve it by doing the following htaccess but the problem is I need to add an exception for sub-url which is /wp-admin/admin-ajax.php How can I do that? Thanks in advance!</p>
  
  <pre><code>RewriteCond %{REQUEST_URI} ^(.*)?wp-admin(.*)$ [OR]
  RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
  RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$
  RewriteRule ^(.*)$ - [R=403,L]
  </code></pre>