Skip Navigation

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

Problem:
The client is experiencing an Internal Server Error on their multilingual WordPress site when clicking any menu items, with logs indicating excessive internal redirects.

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., referer:...

Solution:
We recommend checking the .htaccess file to ensure it follows the default WordPress configuration. If necessary, delete the .htaccess file, save the permalinks to generate a new .htaccess file, and then add the workaround provided in our documentation to the theme's functions.php file.

Here are the steps to follow:
1. Verify the .htaccess file against the default WordPress configuration found here: WordPress .htaccess documentation.
2. If the .htaccess file is incorrect, delete it and save the permalinks in WordPress to create a new one.
3. Add the workaround from our errata page to your theme's functions.php file: WPML .htaccess workaround.

Additionally, increase the WP Memory Limit by adding the following code to your wp-config.php file:

define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Make sure to place these lines before the 'That's all, stop editing! Happy publishing.' comment.

Also, ensure that WPML is updated to the latest version.

If this solution does not resolve your issue, please open a new support ticket with us.

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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 4 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
December 29, 2023 at 3:57 am #15135918

simonC-45

Tell us what you are trying to do? Resolve Internal Server Error
Logs shows:
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., referer: hidden link

[core:debug] core.c(3609): AH00121: r->uri = /zh-hans/index.php, referer: hidden link

[core:debug] core.c(3616): AH00122: redirected from r->uri = /zh-hans/index.php, referer: hidden link

[core:debug] core.c(3616): AH00122: redirected from r->uri = /zh-hans/index.php, referer: hidden link

Is there any documentation that you are following? NO

Is there a similar example that we can see? YES

What is the link to your site?
hidden link

Home Page is OK. But once you click any of the menus, the website generates a Internal Server Error.

December 29, 2023 at 8:43 am #15136068

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Simon,

Thank you for contacting the support.

The reported issue could happen when the .htacess gets overwritten with the language folder (the URL format of the languages on your website, for example /en/, /et/ etc).

Please make sure that your .htaccess meets the default WordPress configuration (https://wordpress.org/documentation/article/htaccess/):

# 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

If this is the case, then you need to delete the .htaccess file, save the permalinks, which should create a new auto-generated .htaccess file from WordPress, and then finally add the workaround from https://wpml.org/errata/htaccess-is-rewritten-with-language-folder/ to your theme's functions.php file.

Besides these, I'll also advise to fix the following:

IMPORTANT: Take full backup of your website and database beforehand.

1) Increase “WP Memory Limit” to at least 128MB while 256MB is recommended. See https://wpml.org/home/minimum-requirements/ for detailed information. You can set this in your wp-config.php file by adding following code:

define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Remember to add these lines before the line where it says:
/* That's all, stop editing! Happy publishing. */

2) Update WPML to the latest version.

Please let me know and I'll try my best to further help you on the matter.

Regards.