I have a main e-commerce website that sites on mywebsite.com, built in PHP & MySQL. (not Wordpress)
The website is multilingual, and the URL structure for other languages look like mywebsite.com/de, mywebsite.com/it etc.
Underneath the main root I want to incorporate a Wordpress blog, which will sit under mywebsite.com/blog.
The blog also needs to be multi-lingual. I'm using the WPML plugin for Wordpress. This allows me to set directories for different languages, such as mywebsite.com/blog/de, mywebsite.com/blog/it. For English (default language) this will just be mywebsite.com/blog.
However, I want a slightly different URL structure for the multi-lingual versions of the blog. I want these to be mywebsite.com/blog for English, but then mywebsite.com/de/blog, mywebsite.com/it/blog etc for other languages.
The issue here is a clash between the main e-commerce website (non-WP) and the blog URLs. Given that the blog will sit under mywebsite.com/blog, can I use rewrite rules to force the blog to display the German version when requesting /de/blog for instance?
I can't seem to find a solution anywhere so I'm asking on here to see if anyone has any insights.