admin管理员组文章数量:1122832
I have a Wordpress subdirectory multisite configured on Nginx, with Cloudflare CDN. I've set all up on Nginx and wp-config.php according to other websites I have functioning correctly with the multisite structure.
On this website the wp-admin is not opening, it "duplicates" the URL when trying to access it. Usually, it should redirect from example/wp-admin to example/wp-login.php?redirect_to=https%3A%2F%2Fexample%2Fwp-admin%2F&reauth=1
But on this website, is redirecting from example/wp-admin to example/wp-admin/example/wp-login.php?redirect_to=https%3A%2F%2Fexample%2Fwp-admin%2F&reauth=1
When accessing it directly through example/wp-login.php it works, but the dashboard opens without CSS:
Removing the multisite lines from wp-config.php it works normally.
I have a Wordpress subdirectory multisite configured on Nginx, with Cloudflare CDN. I've set all up on Nginx and wp-config.php according to other websites I have functioning correctly with the multisite structure.
On this website the wp-admin is not opening, it "duplicates" the URL when trying to access it. Usually, it should redirect from example.com/wp-admin to example.com/wp-login.php?redirect_to=https%3A%2F%2Fexample.com%2Fwp-admin%2F&reauth=1
But on this website, is redirecting from example.com/wp-admin to example.com/wp-admin/example.com/wp-login.php?redirect_to=https%3A%2F%2Fexample.com%2Fwp-admin%2F&reauth=1
When accessing it directly through example.com/wp-login.php it works, but the dashboard opens without CSS:
Removing the multisite lines from wp-config.php it works normally.
Share Improve this question edited Jun 5, 2024 at 21:24 Ana asked Jun 5, 2024 at 21:09 AnaAna 112 bronze badges2 Answers
Reset to default 1Solved it adding an annotation to the ingress:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/configuration-snippet: |
rewrite ^(/[^/]+)?(/wp-admin)$ $1$2/ break;
rewrite ^(/[^/]+)?(/wp-admin/.*)$ $1$2 break;
And changing the pathtype to ImplementationSpecific
Add the below code to your wp-config.php file and observe any issues that may causes this issue and resolve them
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
本文标签: Wpadmin wrongly redirecting on multisite
版权声明:本文标题:Wp-admin wrongly redirecting on multisite 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736304197a1932150.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论