.htaccess language redirect with multisite
-
(I think I mistakenly posted this question to the Networking Support Forum. Sorry for the duplicate post.)
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 the 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 old 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 (it 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
- The topic ‘.htaccess language redirect with multisite’ is closed to new replies.