Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where the language parameter is being added to the .htaccess file on multiple sites using WPML, causing the website to become unusable. The altered .htaccess file includes a language base such as /en/, /ru/, or /lt/ which disrupts the site's functionality.
Solution:
If you're encountering this issue, we recommend following the workaround provided in the WPML documentation. Please visit the following link for a detailed guide and explanation of the root cause: https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/.

Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket for further assistance.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 0 voices.

Last updated by vadimP 3 days, 1 hour ago.

Assisted by: Andrey.

Author Posts
July 21, 2025 at 5:05 pm #17256929

vadimP

Background of the issue:
I am trying to resolve an ongoing issue where the language parameter is being added to the .htaccess file, making the website unusable. This issue occurs randomly on many sites we own and manage with WPML. We need to quickly replace the .htaccess file with the default WordPress configuration to solve this temporarily. As a workaround, we make the .htaccess file read-only, but this is not ideal. This issue has recently occurred on at least three sites: stellina.lv, thermex.lv, and beebikauplus.ee. A page where the issue can be seen is hidden link. The expected .htaccess configuration is: # 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

Symptoms:
The .htaccess file is being altered to include a language parameter, such as /en/, /ru/, or /lt/, causing the site to become unusable. The altered .htaccess configuration is: # BEGIN WordPress

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

# END WordPress

Questions:
Why is the language parameter being added to the .htaccess file?
How can we prevent the .htaccess file from being altered?

July 21, 2025 at 6:55 pm #17257190

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

To resolve this issue, please follow the workaround described in the link below:

https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

The article also provides an explanation of the root cause of this problem.

July 24, 2025 at 7:30 am #17266165

vadimP

Thank you!