Why is .htaccess getting overwritten with the language folder

For some reason Loco or other plugin is randomly, on a daily basis adds language folder to our htaccess file causing frontend to break in a redirect loop

Here is an example of what I expect to see in htaccess:

BEGIN WordPress

RewriteEngine On
RewriteRule .* –

[E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]RewriteBase /
RewriteRule ^index.php$ – [L]RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

END WordPress

Here is what I actually get:

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteRule .* -
[E=HTTP_AUTHORIZATION :% <НТ:Authorization}] 
RewriteBase /en/ 
RewriteRule ^index. php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /en/index.php [L]
END WordPress

Once I had similar issue with WPML and it was never addressed properly, they just suggested some snippet that blocks adding language folder – https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

What could be a better solution here?

  • This topic was modified 1 day ago by Vadim.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer