WordPress, nginx proxy and subdirectory: wp-login.php redirects to domain
I have also met with same problem, I found a workaround, to fix the issue, add below code to wp-config.php
$_SERVER['REQUEST_URI'] = str_replace("/wp-admin/", "/blog/wp-admin/", $_SERVER['REQUEST_URI']);
Redirect to 127.0.0.1 when access a wordpress hosted with apache and nginx in proxy
It's wordpress redirect to HTTP_HOST
, adding
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
in wp-config.php
fix it.
Related Topics
Zend Framework 2 - Removed Form Element Causes Validation to Fail
How to Allow a User to Download a File Which Is Stored Outside of the Webroot
Get Request from PHP Using File_Get_Contents with Parameters
Php: How to Check If the Client Is Local
Unable to Scrape Content from a Website
Symfony & Guard: "The Security Token Was Removed Due to an Accountstatusexception"
Html2Pdf in PHP - Convert Utilities & Scripts - Examples & Demos
Get Values Stdclass Object PHP
Strip_Tags() Function Blacklist Rather Than Whitelist
Nl2Br() Equivalent in JavaScript
Laravel Expected Response Code 250 But Got Code "530"
What's the Difference Between If(!$Variable) and If(Isset($Variable))