This thread is resolved. Here is a description of the problem and solution.
Problem: You are experiencing an Error 500 on your server due to too many redirects after updating WooCommerce. This issue is linked to a corrupted .htaccess file caused by WPML leaving a redirect in it to secondary languages. Solution: If you're facing this issue, we recommend checking if third-party plugins are calling the
flush_rewrite_rules(true)
function too frequently, which can repeatedly modify the rewrite rules in your .htaccess file. This frequent modification might be causing the issues on your WordPress site. For more information and a suggested workaround, please visit our 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.
Symptoms:
Error 500 on the server due to too many redirects. The .htaccess file was corrupted.
Questions:
How can I prevent the .htaccess file from being corrupted after a WooCommerce update?
Is there a permanent fix for the redirect issue caused by WPML?
at the same time of this error I also have this one in the logs:
[17-Jun-2025 12:37:19 UTC] PHP Fatal error: Uncaught Error: Class "WC_Notes_Refund_Returns" not found in /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Internal/Admin/Events.php:129
Stack trace:
#0 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php(160): Automattic\WooCommerce\Internal\Admin\Events->init()
#1 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php(109): Automattic\WooCommerce\Internal\Admin\FeaturePlugin->includes()
#2 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php(92): Automattic\WooCommerce\Internal\Admin\FeaturePlugin->on_plugins_loaded()
#3 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Admin/Composer/Package.php(65): Automattic\WooCommerce\Internal\Admin\FeaturePlugin->init()
#4 [internal function]: Automattic\WooCommerce\Admin\Composer\Package::init()
#5 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Packages.php(291): call_user_func(Array)
#6 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Packages.php(89): Automattic\WooCommerce\Packages::initialize_packages()
#7 /data/sites/web/baniwafelsbe/www/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Packages::on_init('')
#8 /data/sites/web/baniwafelsbe/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#9 /data/sites/web/baniwafelsbe/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#10 /data/sites/web/baniwafelsbe/www/wp-settings.php(578): do_action('...')
#11 /data/sites/web/baniwafelsbe/www/wp-config.php(100): require_once('...')
#12 /data/sites/web/baniwafelsbe/www/wp-load.php(50): require_once('...')
#13 /data/sites/web/baniwafelsbe/www/wp-blog-header.php(13): require_once('...')
#14 /data/sites/web/baniwafelsbe/www/index.php(17): require('...')
#15 {main}
thrown in /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Internal/Admin/Events.php on line 129
[17-Jun-2025 12:37:19 UTC] PHP Fatal error: Uncaught Error: Class "WC_Admin_Settings" not found in /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/Settings.php:449
Stack trace:
#0 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Utilities/LoggingUtil.php(28): Automattic\WooCommerce\Internal\Admin\Logging\Settings->logging_is_enabled()
#1 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/includes/class-wc-logger.php(116): Automattic\WooCommerce\Utilities\LoggingUtil::logging_is_enabled()
#2 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/includes/class-wc-logger.php(173): WC_Logger->should_handle('...')
#3 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/includes/class-wc-logger.php(236): WC_Logger->log('...', '...', Array)
#4 /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/includes/class-woocommerce.php(421): WC_Logger->critical('...', Array)
#5 [internal function]: WooCommerce->log_errors()
#6 {main}
thrown in /data/sites/web/baniwafelsbe/www/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/Settings.php on line 449
This is the redirect limits causing website to be unreachable:
[Tue Jun 17 14:41:28.383137 2025] [error] [pid 715931] core.c(4073): [client 156.200.109.186:0] 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.
[Tue Jun 17 14:41:30.673524 2025] [error] [pid 715996] core.c(4073): [client 2a02:2788:9d9:f4a0:b846:4050:e5d5:7e30:0] 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.
Perhaps that is useful for the troubleshooting.
This is the part of the htaccess that causes the redirects (notice the fr):
# END WP Rocket
# BEGIN WordPress
# De richtlijnen (regels) tussen "BEGIN WordPress" en "END WordPress" worden
# dynamisch gegenereerd en zouden alleen aangepast mogen worden via WordPress filters.
# Alle wijzigingen aan de richtlijnen tussen deze markeringen worden overschreven.
<IfModule mod_rewrite.c>
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]
</IfModule>
Sometimes, third-party plugins call the flush_rewrite_rules(true) function too frequently. This can repeatedly modify the rewrite rules in your .htaccess file, which may cause issues on your WordPress site.
Please check this article for more information and a suggested workaround:
Thank you for the info. I will keep it in mind. However my issue is more related to the original bug report (open issue link in initial post). It is exactly the same thing.
For the time being the issue is resolved as I resaved the permalinks. I mostly wanted to report so when they fix the linked bug the also take into account products with custom base.