Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Kyiv (GMT+02:00)

This topic contains 1 reply, has 0 voices.

Last updated by Andrey 1 day, 1 hour ago.

Assisted by: Andrey.

Author Posts
January 8, 2025 at 8:59 pm #16575339

patrykP-6

Background of the issue:
Hi,

Earlier, I had an issue with a 500 Internal Server Error. I had to change the file permissions for the .htaccess file to 444 to prevent it from modifying the redirects from:

# 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]
RewriteRule ^en/wp-login.php /en/wp-login.php [QSA,L]
RewriteRule ^pl/wp-login.php /en/wp-login.php [QSA,L]
RewriteRule ^ro/wp-login.php /en/wp-login.php [QSA,L]
RewriteRule ^uk/wp-login.php /en/wp-login.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /en/index.php [L]

# END WordPress

to:

# 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 /en/
RewriteRule ^index.php$ - [L]
RewriteRule ^en/wp-login.php /en/wp-login.php [QSA,L]
RewriteRule ^pl/wp-login.php /en/wp-login.php [QSA,L]
RewriteRule ^ro/wp-login.php /en/wp-login.php [QSA,L]
RewriteRule ^uk/wp-login.php /en/wp-login.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /en/index.php [L]

# END WordPress
I contacted B2B King because this issue occurred at the same time I was installing both your plugin and theirs. They told me it was interesting because they have many websites using WPML and their plugin, and they haven't heard of such an error. However, I sent them links to your forum discussing this issue, and they provided me with the following code:

add_filter('b2bking_flush_permalinks','__return_false');

I added it, and everything worked fine until today when I installed your update from December 19th, and the problem returned despite the active code from B2B King.

I had to restore the .htaccess file and set the file permissions to 444 again — it's really annoying.

How can I fix this?

Symptoms:
I encountered a 500 Internal Server Error. After installing the update from December 19th, the problem returned despite the active code from B2B King. I had to restore the .htaccess file and set the file permissions to 444 again.

Questions:
How can I fix the 500 Internal Server Error after the update?
Why did the problem return despite the active code from B2B King?

January 8, 2025 at 9:56 pm #16575555

Andrey
Supporter

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

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

I’m sorry that you ran into trouble with this.

Some third-party plugins occasionally call the flush_rewrite_rules(true) function too frequently. This can result in changes to the rewrite rules in your .htaccess file, leading to potential issues on your WordPress site.

For more information, please take a look at this link: https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/.

I hope this helps!