Support » Plugins » separate admin server: how make new posts create for different base domain

  • Hello,

    I’m trying to set up a wordpress system where I have two servers connected to the same database, one server to do administration via https: and one to do service via http. I’m currently testing these on the same physical box with apache vhosts, listening on port 80 and 443, respectively.

    The first difficulty in this is that wordpress reads the WP_SITEURL AND WP_HOME out of the database and forces its redirects.

    I’m able to solve that with this bit of code in my wp-config.php:
    if $_SERVER[‘SERVER_PORT’] == 443{
    define(‘WP_SITEURL’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);
    define(‘WP_HOME’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);
    {define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’]);
    define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’]);}

    The only problem is that when I go to create a new post, and I’m logged in via ssl on port 443, the new baseurl for the post is to the secure site. Everything else seems to work just great.

    I’m wondering if there is a way to get around this? I would like, by the way, to use a completely different IP and DNS name for the admin server, so no, i’m not interested i one of the existing plugins for https/ssl. Can anybody give me a hint of what kind of code (a hook, a filter, a rewwrite?) i might use to change how wordpress fills out te domain portion of the URL for NEW posts, and how I might change that?

    I figure I can’t be the only one to whom the idea of having a seperate admin panel seems like a wonderful thing, like when we get a ddos attack on our main site, or if we want to set up a load balancer but not have the cpu load from editing triggering a new public server to spin up…but I digress.

    I did look at the plugins available and could find nothing that allowed one to change the base permalink of a new post. WordPress prevents one from doing this, although in this case it would be very useful!

    Does anyone have any suggestions?

    Thank you so much!


  • The topic ‘separate admin server: how make new posts create for different base domain’ is closed to new replies.