WordPress wp-admin redirect_to points to URL with folder name
-
I am having problem with
wp-admin
where the redirect_to variable holds my wp-admin URL with the folder name included in the URL. When I remove it, the redirect works good. The problem occurs when I set up my.htaccess
file, here is my.htaccess
content:RewriteEngine on
RewriteBase /# Whatever request coming to the server, add www to it
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]# Map the www URL to the subfolder in root directory
RewriteCond %{HTTP_HOST} www\.myurl\.com$
RewriteCond %{REQUEST_URI} !^/thefolder/
RewriteRule (.*) /thefolder/$1In wp-config.php I have these lines:
define(‘WP_HOME’,’https://www.myurl.com’);
define(‘WP_SITEURL’,’https://www.myurl.com’);I have updated my DB as well in table options where I have set the site URL and home to
https://www.myurl.com
. I searched for solutions through WP forum but none is working for me still. The redirect_to URL now looks likehttps://www.myurl.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.myurl.com%2Fthefolder%2Fwp-admin%2F&reauth=1
I am not expecting thefolder to be there. I have to remove it. Any help and advice is greatly appreciated.
- The topic ‘WordPress wp-admin redirect_to points to URL with folder name’ is closed to new replies.