[wp-trac] [WordPress Trac] #55971: saving settings returns 404 - WP_SITEURL not used?
WordPress Trac
noreply at wordpress.org
Mon Jun 13 16:10:42 UTC 2022
#55971: saving settings returns 404 - WP_SITEURL not used?
--------------------------+-----------------------------
Reporter: mommens | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.0
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
I have 2 servers.
Server B hosts a WordPress installation (DigitalOcean Marketplace 1 click
install).
Server A hosts example.com. The blog is accessed at example.com/blog
thanks to Apache proxypass:
{{{
<Location "/blog">
ProxyAddHeaders On
ProxyPass https://10.110.0.3
ProxyPassReverse https://10.110.0.3
Header add Access-Control-Allow-Origin "*"
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
</Location>
}}}
in wp-config.php I have set
{{{
if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
define('WP_HOME','https://example.com/blog');
define('WP_SITEURL','https://example.com/blog');
}}}
Everything works fine apart from saving the settings that return a 404.
The form is submitted to the incorrect URL:
https://example.com/wp-admin/options-general.php?settings-updated=true
instead of
https://example.com/blog/wp-admin/options-general.php?settings-
updated=true
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55971>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list