.htaccess language redirect with multisite
-
I’m transitioning a two language (English+French) website from a older non-responsive static css/html design to something more modern and have been learning WordPress as I think it will provide some benefits.
So far I have a multisite installation working properly using two sub-folders (/en and /fr) for their respective english and french versions. Each uses its own child template of the Twenty Twenty-Four Theme.
In the original html website I added code to the .htaccess file to redirect visitors to the appropriate sub folder based on their browser language. Can the WordPress multisite’s .htaccess file be used to do something similar?
I tried copying and pasting the same code used on the old static site below the multisite “WordPress” code in the .htaccess file, but it doesn’t appear to work (didn’t break anything either).
As the “/en” and “/fr” folders are dynamically created by WP I’m thinking that an htaccess redirect based on the visitor’s browser language might not be possible.
Is there a recommended way to do this (other than pay $$ for a plugin)?
Thank you for any advice.
Russell
R
- You must be logged in to reply to this topic.