• Resolved katmacau

    (@katmacau)


    Hello. I’ve used your plugin many times. But I am working on site soon with a domain alias. Eg site works on mysite.com.au and mysite.co.nz. Most content is the same but some will use some coding to detect if on .au or .nz url, and show relevant content.

    Is this compatible with Hummingbird page caching?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @katmacau

    I hope you’re well today!

    Do I correctly understand that we are talking about a standard single WordPress setup (just with domain aliases for certain areas) and not a Multisite that uses custom (mapped) domains for sub-sites?

    If that’s correct then I must admit I’m not sure as it wouldn’t be very popular type of setup and not widely tested. I would say Page Cache should work fine but I have asked our Hummingbird Team (developers) for additional feedback on it and I’m waiting for their response.

    We’ll update you here soon again with more information about this.

    Best regards,
    Adam

    Thread Starter katmacau

    (@katmacau)

    Hi Adam

    It’s single wordpress site setup with root-relative URLS so that it works as both mysite.com.au and mysite.co.nz.

    And then geo-targeting used to alter some bits of content or page availability for each domain.

    Not a multi-site setup.

    Thank you.

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @katmacau

    Thank you for the information,

    Could you let us know if you are using any specific plugin to create geo-targeting?

    The plugin may work differently depending on how you are applying it,

    Best Regards
    Patrick Freitas

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @katmacau

    Meanwhile, I got additional update form our developers. In setup like this you can try adding this code to the site as an MU plugin:

    
    if ( isset( $_SERVER['HTTP_HOST'] ) && 'your-second-site.com' === $_SERVER['HTTP_HOST'] ) {
        setcookie( 'wphb_cache_domain', 'your-second-site.com', 0, '/', 'your-second-site.com');
    }

    You would need to replace “your-second-site.com” with the additional domain that you are using. If you have multiple domains, you can repeat this code for each of them (except the “main” one for which it’s not needed), setting differnet domain in each.

    This should help “differentiate” cache between domains so to avoid any “clashes”.

    To add it as MU plugin:

    – create an empty file with a .php extension (e.g. “hummingbird-multidomain-cache.php”)
    – put this as a first line of the file

    <?php

    – put shared code below it
    – save the file and upload it to the “/wp-content/mu-plugins” folder of your site.

    Best regards,
    Adam

    Thread Starter katmacau

    (@katmacau)

    That’s great. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Compatibility with domain aliases’ is closed to new replies.