You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for issue 2 above
the infinite redirect is caused by one of two routes in src/App/src/RoutesDelegator.php
$app->get('/{first}', function ($request) {
$uri = $request->getUri();
return new RedirectResponse((string) $uri . '/', 301);
});
$app->get('/{first}/{second}', function ($request) {
$uri = $request->getUri();
return new RedirectResponse((string) $uri . '/', 301);
});
the initial purpose for these routes was to add the trailing slash for urls
e.g. from https://new.dotkernel.com/blog to https://new.dotkernel.com/blog/
but urls with query like wp-login.php?redirect_to=https%3A%2F%2Fwww.dotkernel.com%2Fwp-admin%2F&reauth=1 caused the infinite redirect
this new route in the linked PR did not fix the issue
$app->get('/{wpPath:wp-.*}', function () {
return new RedirectResponse('/', 301);
});
i removed the routes above and offered two solutions in #148
the code has the middleware and a comment has the .htaccess alternative
site is live
from the branch
liveNow, the problem are:
https://www.dotkernel.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.dotkernel.com%2Fwp-admin%2F&reauth=1