Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#55971 new defect (bug)

saving settings returns 404 - WP_SITEURL not used?

Reported by: mommens's profile mommens Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0
Component: General Keywords:
Focuses: Cc:


I have 2 servers.

Server B hosts a WordPress installation (DigitalOcean Marketplace 1 click install).

Server A hosts The blog is accessed at thanks to Apache proxypass:

        <Location "/blog">
                  ProxyAddHeaders On
                  Header add Access-Control-Allow-Origin "*"                  
                  RequestHeader set X-Forwarded-Proto "https"
                  RequestHeader set X-Forwarded-Port "443"

in wp-config.php I have set

        $_SERVER['HTTPS'] = 'on';


Everything works fine apart from saving the settings that return a 404.
The form is submitted to the incorrect URL:

instead of

Change History (2)

#1 @mommens
2 years ago

The settings are actually saved. But we're not redirected to the right page afterward.

#2 @mommens
2 years ago

Adding these redirects to Apache corrects all failing settings:

        RedirectMatch /wp-admin/options-general.php /blog/wp-admin/options-general.php
        RedirectMatch /wp-admin/options-writing.php /blog/wp-admin/options-writing.php
	RedirectMatch /wp-admin/options-reading.php /blog/wp-admin/options-reading.php
        RedirectMatch /wp-admin/options-discussion.php /blog/wp-admin/options-discussion.php
        RedirectMatch /wp-admin/options-media.php /blog/wp-admin/options-media.php

But that's only a hack.

Note: See TracTickets for help on using tickets.