Wordpress nginx redirect loop

后端 未结 5 549
旧巷少年郎
旧巷少年郎 2020-12-15 09:13

So, yesterday I had a question how to install the wordpress in the \"/root\" directory. I wasn\'t very successful in that one and I forgo\'ed on that one.

So, right

5条回答
  •  被撕碎了的回忆
    2020-12-15 10:02

    In my case, the redirect loop only affected wp-admin pages, so I added at the start of the line

    if (is_admin) remove_filter('template_redirect', 'redirect_canonical');
    

    and still works, plus the redirect canonical keeps doing its job on the front end!

    I hope this helps someone else!

提交回复
热议问题