• I’ve been struggling with this for a few hours and I’m at a loss. This is the only wordpress site we we run, so we weren’t super familiar setting it up to begin with.

    Here’s what we want to do: We have wordpress hosted off of wordpress.ourserver.blah, and the “organization” has the domain name http://www.ourcompany.com. So we have our DNS pointing http://www.ourcompany.com to wordpress.ourserver.blah. That seems as if it should work.

    Here’s what the problem is: If we browse to wordpress.ourserver.blah everything works. I can view the content, I can reach all the dynamic content on the page, as well as get to all the admin controls. However, if we go to http://www.ourcompany.com, we can reach the dynamic content, but not any of the admin tools. I have no idea. WP_HOME and WP_SITEURL are all set to “http://’.$_SERVER[‘HTTP_HOST’])”, and we have a wp-config for each possible domain.

    There is no local redirect happening on the machine, outside of forwarding wp-upload being sent to another directory, and all of that seems to be working just fine.

    We’re at a bit of a loss on this, any ideas?

Viewing 9 replies - 1 through 9 (of 9 total)
  • You cannot use two different urls for the same site. Which do you want the site to use: wordpress.ourserver.blah or http://www.ourcompany.com/

    Thread Starter blakfeld

    (@blakfeld)

    Well, I think I described the problem poorly now that I think about it

    wordpress.ourserver.blah is just the server hostname. So if I access the site via the server’s hostname it works (If I try to go to just the ip address, it yells at me about not having a wp-config with that name, but that makes sense), but not by the actual domain name. Do I need to change it so the server’s host name matches what the domain needs to be?

    What urls are entered in Settings -> General?

    Thread Starter blakfeld

    (@blakfeld)

    Those are grayed out, but in the config-domainname.php I have

    define(‘WP_HOME’, ‘http://’.$_SERVER[‘HTTP_HOST’]);
    define(‘WP_SITEURL’, ‘http://’.$SERVER[‘HTTP_HOST’]);

    Before I added that, they both had the hostname in them. Changing “Site URL” caused everything to become unreachable, and changing “Home” did nothing

    Why on earth did you add lines like that! Remove them and use the functions.php method to set the Site and WordPress urls correctly.

    Thread Starter blakfeld

    (@blakfeld)

    What’s the functions.php method?

    I tried
    update_option(‘siteurl’,’hostname/domainname’);
    update_option(‘home’,’hostname/domainname’);
    As is listed in the documentation, but that made the site unreachable

    Thread Starter blakfeld

    (@blakfeld)

    Hmm, unfortunately thats the documentation I was talking about above

    The first method in there has the site working, which is to use the defines, but like I said in my last post, the functions.php method listed in the documentation results in the page being inaccessible. Any idea why the functions.php method is failing for me?

    Does WordPress have a url rewrite that happens anywhere? Is it a problem with the vHost perhaps? Although ours was basically copied and pasted from the included docs

    the functions.php method listed in the documentation results in the page being inaccessible

    I’ve used that method countless times without any problem, so I can only assume that you are not adding the appropriate lines correctly. Remember that every punctuation mark counts in PHP.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Unable to reach admin pages from domain name’ is closed to new replies.