user1737222
user1737222

Reputation: 13

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.

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?

Upvotes: 1

Views: 1504

Answers (2)

soju
soju

Reputation: 25312

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]

Upvotes: 1

user1693775
user1693775

Reputation: 126

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

Upvotes: 0

Related Questions