Vinobe
Vinobe

Reputation: 83

Wordpress - wpml different domains - behind reverse proxy

Situation

My client has a webshop in 2 languages:
- my-website.be (Dutch + French)
- my-website.nl (Dutch)

I have to remake the /blog for these 3 languages using Wordpress.
I have no access to the main website and server, so this has to be done with reverse proxy.

Ideally this will look like this:
- my-website.be/nl-be/blog/%postname%/
- my-website.be/fr-be/blog/%postname%/
- my-website.nl/blog/%postname%/

We use WPML(pro) for translation on the website
I have to proof this is possible

The problem

I'm trying to proof this is possible with wpml + reverse proxy on my local machine using MampPro for Windows. (As I do not have real/live servers/domains available to test this) And this is not working correctly whatever I try.

The local test setup

my-site.localbe

<IfModule mod_rewrite.c>
    RewriteEngine On  
    RewriteRule ^nl-be/blog/(.*)$ http://my-site.test/$1 [P]  
    RewriteRule ^fr-be/blog/(.*)$ http://my-site.test/$1 [P]  
</IfModule>

my-site.localnl

<IfModule mod_rewrite.c>
    RewriteEngine On  
    RewriteRule ^blog/(.*)$ http://my-site.test/$1 [P]  
</IfModule>

==> with this setup both reverse proxy domain just show the default homepage and/or subpages. There's no way to access the other languages.

What we've tried

Results

I would like to know

Thanks a lot, a developer in distress

Upvotes: 1

Views: 303

Answers (0)

Related Questions