wordpress redirects me to subdirectory folder

I have wordpress installed in subdirectory folder named “thumbs”. I also followed the steps here.

Everything works fine but if I go to www.mysite.com/wp-admin it redirects me to www.mysite.com/thumbs/wp-admin, I don’t want that to happen because I want the subdirectory folder to be secret.

Read More

So what I want is if I visit or somebody visit www.mysite.com/wp-admin I want the wordpress 404 error page to display. Thanks in advance for the help.

What am I missing?

Related posts

Leave a Reply

2 comments

  1. You should modify your root .htaccess (not thumbs/.htaccess) file to add a rule for wp-admin, e.g. :

    RewriteEngine On
    RewriteBase /
    RewriteRule ^wp-admin - [L]
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
  2. Change your HTACCESS with this code

    # Switch rewrite engine off in case this was installed under HostPay.
    RewriteEngine Off
    
    SetEnv DEFAULT_PHP_VERSION 53
    
    DirectoryIndex index.cgi index.php
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
     RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule . /index.php [L]
     </IfModule>
    
     # END WordPress