A few people have reported the same problem in exactly the same situation, but when I try and investigate the problem disappears. There is nothing in the plugin to redirect to wp-admin.
I can see the behaviour when I access your site, and I can also see that Redirection is not causing the redirect. I don’t know why the problem disappears when you disable Redirection.
Does it happen if you disable Really Simple SSL?
Do you have any kind of cache setup?
Thread Starter
zviera
(@zviera)
Hi John,
thanks for the quick reply.
Yes, it does happen even when Really Simple SSL is disabled.
Yes, we use WP Super Cache, but it does happen even with the plugin disabled.
Thanks.
Lubo
Ok. I may be close to solution?
I had same issue. After hour or so I found that is Redirection plugin fault for sure. Same issue. After turning off plugin everything was fine.
When i turn it on it was mess again.
I tried with several custom new redirection but that wasn’t a real solution. After deep searching I found somewhere suggestion that issue can be connected with SSL.
So what I did. I unchecked this option “Force a redirect from HTTP to HTTPS. Please ensure your HTTPS is working before enabling (beta)” (https://prnt.sc/mf8ffn), cleaned cache and everything started working again.
What is weird that after uncheck and reload page this option is checked again… But solution for now working.
I believe that it could be some kind of conflict between this plugin and Really Simple SSL… Please check if that “solution” working for you too!
🙂
Thread Starter
zviera
(@zviera)
Thanks @siergiejpoz for the suggestion. I have actually switched to another plugin, since I needed this resolved quickly. I am not using Redirection anymore.
@zviera
As I understood plugin change solved all your issues? If yes can you give me plugin name which you used as alternative in case that my solution won’t work permanent?
Thread Starter
zviera
(@zviera)
@siergiejpoz Yes, I have used the plugin “Safe Redirect Manager” and the issue is gone since. That plugin also supports regular expressions, which I needed, and other plugins couldn’t handle it.
I’m sorry you had problems with this plugin and had to go elsewhere. As I mentioned above, I have never been able to investigate this. If anyone does want to try again I’d be more than willing to try and dig deeper into the site to try and figure out what is happening.
Thread Starter
zviera
(@zviera)
@johnny5 I have sent you a message through your website.
Have been experiencing the same issue with a client site, exactly as described.
Issue:
http://www.myurl.com/page → https://myurl.com/wp-admin (or wp-login.php)
Debug:
- Disabled Redirection. The above works as expected (though showing non-SSL URL)
- Enabled Redirection. Turned
Force HTTPS
on. Same issue as described above
- Turned
Force HTTPS
off. Works as described in Step 1.
Had a look in the Redirection plugin code, to see how the HTTPS redirect was done, and in modules/wordpress.php
on line 96 in the force_https
function, the wp_safe_redirect
function is used to redirect to the requested URL, forcing HTTPS:
wp_safe_redirect( 'https://' . $target, 301 );
This function is found in pluggable.php
, line 1277-1311, and it actually has a fallback to the Admin URL when it considers the the new URL to not be valid, and runs through a filter to validate and determine if the new URL is safe or not.
This seems to be where the issue lies — WordPress considers the URL its given as not safe, and reverts to the fallback URL which is the admin URL.
I’m not sure how to fix — but should hopefully aid the plugin developer in debugging/tracking down the issue!