If you want to replace a page with another, it is just a simple RewriteRule
RewriteRule ^zh/about.html$ /en/about.html [R,L]
If you want to redirect all pages to the English counterpart, you must first capture the part after the language, and append it to en
. But you must be careful and check, if it is already en
. Otherwise, you would have a rewrite loop
RewriteCond %{REQUEST_URI} !^/en/
RewriteRule ^../(.*)$ /en/$1 [R,L]
When everything works as it should, you may replace R
with R=301
(permanent redirect). Never test with R=301
.
To have any other length prefix, use .+?
instead of ..
. This looks for one or more instead of just two characters
RewriteRule ^.+?/(.*)$ /en/$1 [R,L]