Forums

How to use WordPress both from Intranet and Extranet? (4 posts)

  1. lecyborg
    Member
    Posted 5 years ago #

    Hi everybody !

    I would like to set up a company blog. It has to be available within the Intranet network (ip 192.168.x.x) and from the Extranet.

    My issue is that I cannot find how to do it. The site adress is filled in the siteurl field in the wp_config table.

    It works only one way, stuff is not loaded on the other side.

    Maybe somebody have already faced the same issue. I use WordPress for my personal blog and I do want to set up it for my company.

    Sébastien, from France

  2. Otto
    Tech Ninja
    Posted 5 years ago #

    It all works based on the name of the server. So set up your name resolution to be different on the inside vs. on the outside.

    If the website is blog.company.com, then set it up such that blog.company.com on the inside resolves to 192.168.x.x, while blog.company.com on the outside resolves to whatever the outside address would be. That way, it works everywhere and looks the same.

  3. lecyborg
    Member
    Posted 5 years ago #

    Sadly, we do not have a DNS server in our network...

    It's not easy to set up because users are used (sic) to access local server using netbios name :)

    It's nearly impossible for them to change it I guess...

    I'll try if it is the only option. It is?

  4. Otto
    Tech Ninja
    Posted 5 years ago #

    Sadly, we do not have a DNS server in our network...

    I don't have any idea what to say.

    I've never even heard of such a thing. An IP network includes a DNS server. It's just a given. Without one, you can't do name resolution. So nothing will work except by IP address.

    I mean, are you still using HOSTS files or something? Yikes. I'd probably quit and look for a new job. :-P

    You're not going to make it work with NetBios resolution, of all god-forsaken things. Not while making it still accessible to the outside world. You could add the entry to the HOSTS file on every computer in the network. I've done that for short term hacks, but not on any kind of large scale. I shudder at the very thought of it.

    In theory, you could write a filter that would recognize the IP address of the requesting system and return a different value for those two settings depending on whether the IP was local or not. You'd want to add your filters to 'option_siteurl' and 'option_home' using the add_filter() function. Then you would look at the incoming IP, figure out value what you wanted to use, and return it. That would probably work.

Topic Closed

This topic has been closed to new replies.

About this Topic