Support » Fixing WordPress » Not all url paths generated correctly under a mod_proxy configuration

  • Resolved aproimage


    Hi all,

    I will do my best to try and explain this one but it was hard enough coming up with the title.

    Basically one of my clients already has an established website (Lets call it I have built them a secondary WordPress based site for an upcoming promotion. This promotional site is hosted externally, yet they were determined that it should be accessed through a subdirectory of their existing domain (

    They have used a mod_proxy at their end to point their subdirectory to the IP of the hosting for the promotional site, and for the main part I have got everything up and running. There are just a few instances (mainly with back end functions) that result in 404 errors because the subdirectory gets omitted from the url, for example if I try to use the checkboxes to move multiple posts to trash the url will begin….. instead of http://clientsite/thepromotion/wp-admin/edit.php…..

    This happens in a few places, and although the front end seems ok I’d rather get to the bottom of this, is there a way to make sure that the subdirectory (/thepromotion/) is always used in url’s to avoid the 404 errors?

    Another issue that may be related, is that if I refresh the permalinks by visiting the permalinks page, all but the sites home page on the front end, ends up with 500 Internal server errors.

    I’m thinking that I need to reaffirm the sites base url either within WordPress somewhere or in .htaccess any help is much appreciated.


Viewing 1 replies (of 1 total)
  • Just to follow up on this, I revisited the following forum post

    and added the code provided by talkstar to my wp-config.php after adapting it to my needs, for the main part this does the trick.

    $_SERVER['REQUEST_URI'] = '/thepromotion' . $_SERVER['REQUEST_URI'];
    $_SERVER['SCRIPT_NAME'] = '/thepromotion' . $_SERVER['SCRIPT_NAME'];
    $_SERVER['PHP_SELF'] = '/thepromotion' . $_SERVER['PHP_SELF'];
    define('WP_HOME', '');
    define('WP_SITEURL', '');
Viewing 1 replies (of 1 total)
  • The topic ‘Not all url paths generated correctly under a mod_proxy configuration’ is closed to new replies.