Passer au contenu Passer à la barre latérale

Ce sujet contient 0 réponse, a 0 voix.

Dernière mise à jour par mh-4 Il y a 2 mois et 1 semaine.

Assisté par: Shekhar Bhandari.

Auteur Messages
juin 5, 2025 à 7:18 am #17108725

mh-4

Background of the issue:
I updated the sitepress-multilingual-cms from version 4.7.5 to 4.7.6/ wordpress-seo 25.0 -> 25.2 on my site lien caché. After the update, my .htaccess file was changed from RewriteRule . /index.php [L] to RewriteRule . /en/index.php [L]. This change caused the site to crash when visiting pages other than the homepage. This is not the first time this has happened.

Below is the .htaccess content before the update:

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.

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 site crashes when visiting pages other than the homepage after the .htaccess file was changed during the WPML update.

Questions:
How can I prevent my .htaccess file from being changed during WPML updates?