Plugin Author
Chouby
(@chouby)
Hi,
I suggest that you use this plugin: https://wordpress.org/plugins/wordpress-mu-domain-mapping/ which has been tested and is compatible with Polylang.
Hi @chouby,
I can’t seem to make this work. Everything is in the latest version with Polylang and WordPress multisite. Is this a known bug?
Hi @tycoon12344
Did you ever manage to get this to work? Experiencing the same issues unfortunately.
Hi @appscaptain
Yes, we did get it to work, using the Mercator domain mapping plugin: https://github.com/humanmade/Mercator
We did however run into Access-Control-Allow-Origin issues with Javascript, font files etc.
Thanks a lot for the answer @tycoon12344! Appreciate it! Will try.
P.S. Are you running nginx?
P.P.S. Did you manage to fix the Access-Control-Allow-Origin? If you haven’t, as far as I know it has something to do with Cross-Origin Resource Sharing (CORS). And adding the domain that uses the javascript, font files etc. to the allowed domains in your webserver. Hopefully that helps.
-
This reply was modified 6 years, 2 months ago by appscaptain.
-
This reply was modified 6 years, 2 months ago by appscaptain.
Nope, we’re on Apache. You could “fix” the CORS issue by just adding a wildcard to allow all domains to access those resources. But that’s not very good/safe practice in my view.
Or just manually add the domains in question to the CORS whitelist. But that wouldn’t be very dynamic. I think the best way would be to automatically whitelist newly added aliases somehow, but we haven’t come that far yet.
@tycoon12344 Thanks so much for your help! Can’t express how much I really appreciate you pointing me to Mercator. After trying to make this work for weeks, the domain redirection finally works! 😛 Thanks again for your help and have a great day!
For anyone struggling with the same issue of Domain mapping not working with Polylang under a multisite setup please follow these steps:
1. Park the domains you want to use for other languages under the main domain (eg. park domain.de under domain.com if you’re making a german localization). I can recommend VPSSIM which makes this easier. If you’re running your own VPS. Or check with your hosting provider about how to do that.
2. Install https://github.com/humanmade/Mercator (replace the WordPress MU Domain Mapping if you already use that)
3. Go under Network Admin > Sites > Edit Site > Aliases and setup the alternative languages domains.
This seems to work under both nginx and Apache (according to @tycoon12344) – personally tested with nginx under WordPress 4.9.3.
-
This reply was modified 6 years, 2 months ago by appscaptain.