• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

BUG Too many redirects

Temyk

Support team
Staff member
Messages
421
Likes
22
Points
18
#2
Hi,

Most likely the page on which you make a redirect also makes a redirect. Try to put a redirect to another page
 

mhumer

New member
Messages
2
Likes
0
Points
1
#3
I can get it to do this too (v1.0.8)

turn on "Hide wp-admin"
turn on "Hide Login Page"
"Access error type" to 404
set "Set custom page 404 url" to "https ://google.com"

go to https: //your domain.com/wp-admin/

wp_safe_redirect will only redirect to a local url, not external to your site
when this redirect fails the original url is loaded again, hence a "to many redirects"

To enable external redirects line 211 of includes/classes/class.configurate-hide-login-page.php needs changing
from wp_safe_redirect($access_redirect_to);
to wp_redirect($access_redirect_to);
 
Last edited:

mhumer

New member
Messages
2
Likes
0
Points
1
#4
I'm also quite sure line 208 of includes/classes/class.configurate-hide-login-page.php is also incorrect
The OR should be an AND else you get stuck in the same wp_safe_redirect trap if
  • the "Set custom page 404 url" is an external link (or badly redirected page)
  • "Access error type" is then set to 404 or 403
to enable expected operation line 208 of includes/classes/class.configurate-hide-login-page.php needs to be changed
from if( $this->getPopulateOption('wpadmin_and_login_access_error') == "redirect_to" || $this->isAdminWhenThisIsBlocked()
to if( $this->getPopulateOption('wpadmin_and_login_access_error') == "redirect_to" && $this->isAdminWhenThisIsBlocked()
v1.0.8
 
Last edited:

Temyk

Support team
Staff member
Messages
421
Likes
22
Points
18
#5
The wp_safe_redirect function is used for security purposes. It is better not to change this function.

I do not see the point of doing a redirect to another site, in this case. This is why the plugin works like this.