• Hi guys,

    I’ve successfully installed and used WordPress on two hosts in the past and have had no problems, however on a third I’m having trouble with the options area.

    Basically, whenever I use the “Update Options” button on any of the options screens, I am sent to /wp-admin/updated=true (which brings up a WordPress 404). Clearly, I should be sent to something like /wp-admin/options-general.php?updated=true.

    Now, I’ve had a quick look in the file where this problem seems to be originating: options.php. The following part is presumably causing the problem:

    $referred = remove_query_arg('updated' , $_SERVER['HTTP_REFERER']);
    $goback = add_query_arg('updated', 'true', $_SERVER['HTTP_REFERER']);
    $goback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $goback);

    I’ve concluded this as changing HTTP_REFERER to something like REQUEST_URI kind of fixes it, except it leaves me on options.php instead of the page I set the options on.

    So, basically, I need to work out why $_SERVER[‘HTTP_REFERER’] just isn’t working, and if there’s a way I can fix it. I haven’t got mod_security enabled, and I’d really like to retain the intended behaviour of returning to the page where I set the option rather than hard coding in some other page for it to take me to.

    Hope somebody can help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    The referrer is something sent by your browser. Either your server is blocking it or your browser isn’t sending it or you have a proxy in the middle blocking it or something along those lines.

    Thread Starter RyanWilliams

    (@ryanwilliams)

    Any idea what exactly would cause the server to block it? I’m fairly certain that it isn’t my browser as I’m able to use WordPress as we speak on other servers.

    Assuming that I need to approach my host about why referrers would be failing, it’d probably help if I had something to give as an example of why it might be happening. :~

    This is happening to me too. On this particular server (of an university) the site url is also set to an unreachable address (webprod instead of www) and I have to fix it manually through phpmyadmin into the database. This clears up most problems except what is described above. I wonder if this has ever been addressed or any tips suggested to work around this problem.

    Also, every other admin page works fine, i.e., returns you to the same page without a 404 error.

    This is happening to me too. On this particular server (of an university) the site url is also set to an unreachable address (webprod instead of www) and I have to fix it manually through phpmyadmin into the database. This clears up most problems except what is described above. I wonder if this has ever been addressed or any tips suggested to work around this problem.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Setting options returns 404; ?update=true referer not passing properly’ is closed to new replies.