title: Unwanted redirection to wp-admin directory
body: <p>I have installed the admin folder of Wordpress inside another directory called "painel" for security reasons.</p>
  
  <p>Now the url is mydomain.com/painel/wp-admin.</p>
  
  <p>However when I type the old URL mydomain.com/wp-admin it redirects to the new one mydomain.com/painel/wp-admin. This is the opposite behavior I am looking for. I specifically want that when someone types mydomain.com/wp-admin it redirects to a 404 error page.</p>
  
  <p>I checked my .htaccess file and it seems that the redirection rule isn't there. But I'm very ignorant on that matter.</p>
  
  <p>Here it is:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^(www.)?mydomain.com$
  RewriteCond %{REQUEST_URI} !^/painel/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /painel/$1
  RewriteCond %{HTTP_HOST} ^(www.)?mydomain.com$
  RewriteRule ^(/)?$ painel/index.php [L] 
  &lt;/IfModule&gt;
  
  
  &lt;IfModule mod_headers.c&gt;
    &lt;FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$"&gt;
      Header set Access-Control-Allow-Origin "*"
    &lt;/FilesMatch&gt;
  &lt;/IfModule&gt;
  # BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  
  <p>Any idea of how I can stop the redirection?</p>