Home Plugins fix htaccess wpml language
Fix .htaccess WPML language logo

Fix .htaccess WPML language

by David Garcia on WordPress.org

In certain cases, the .htaccess may get overwritten with the language folder.

(0)

The problem actually comes from certain third-party plugins calling flush_rewrite_rules(true) function too often. This causes WordPress to overwrite .htaccess. However, in some cases, this happens so often, sometimes even on every page request, that it’s called while browsing the front-end in another language.

When this happens, WPML goes ahead and adds the language folder to home_url as usual. This, however, results with an incorrect RewriteBase in .htaccess and ends up breaking the front-end.

Additionally, you’ll get a 500 Internal Server Error error.

And this is what we’ll see in server logs:

AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.

Active installations20+
Weekly downloads
10+42.86%
Version1.0
Last updated10/30/2023
WordPress version4.9
Tested up to6.3.5
PHP version7.0
Tags
htaccesslanguagerewriteruleswpml