Skip Navigation

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

Problem:
The client was experiencing a redirect loop issue when setting up a WPML language root page on a WordPress site using WPEngine Cache and Solid Security. The loop occurred between WPML redirection and SSL redirects, caused by the site's WordPress address being set to HTTP instead of HTTPS.

Solution:
We recommended checking for existing redirects in the .htaccess file or using plugins like Simple 301 Redirects, and ensuring no conflicts with WPEngine Cache or Solid Security. The client resolved the issue by updating the WordPress address from HTTP to HTTPS, which corrected the redirection loop. If you're experiencing similar issues, we recommend verifying your site's URL settings and checking for any conflicting redirects.

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 problem persists, please open a new support ticket.

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 6 replies, has 1 voice.

Last updated by guillaumeP-22 6 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
November 25, 2024 at 8:34 pm #16441939

guillaumeP-22

Background of the issue:
I want to create a redirection root page as in your documentation for my site hidden link. I use WPEngine Cache and Solid Security.

Symptoms:
It creates a redirect loop between WPML redirection and Solid Security / WPEngine SSL redirect.

Questions:
How can I resolve the redirect loop issue between WPML redirection and SSL redirect?
Is there a specific configuration needed for WPEngine Cache when setting up a WPML language root page?

November 27, 2024 at 11:54 am #16448891

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

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

Hi,

thanks for contacting us.

There shouldn't be any issues with WPEngine cache, did you try disabling that and also
Solid Security and see if the redirection works?
Please also check that there aren't already any redirects in place in Simple 301 Redirects or your .htaccess file.

If nothing of this helps, please provide us with the exact code you're using in your root page and how it's called.

December 4, 2024 at 3:43 pm #16477714

guillaumeP-22

I do not have any redirection anywhere since now my moov.ai page is the exact same duplicathe than the moov.ai/en.

I tried disabling Solid Security. It's working on my staging but not on my dev environment. They are the same.

What code do you need?

December 5, 2024 at 9:45 am #16480676

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Hi,

Thank you for contacting the support. I'm assigned this ticket and 'll try my best to help you on the matter.

Can you please explain about the issue in little more detail? A screen recording showing the issue 'll be much helpful.

Regards.

December 5, 2024 at 8:31 pm #16483736

guillaumeP-22

So, I want to redirect my root domain to my /en (default language) page.

I have a staging environment that is the EXACT same environment as my production. I did the steps provided here : https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/#redirect-the-root-domain-to-the-default-language-directory

I used the exact same code as in the documentation.

Tried it on my staging environment, the redirect is working (as long as I revove Solid Security's "Enfoce SSL" setting.

I did the exact same operation on my production environment and the home page is entering a redirection loop.

The only difference is that the production environment uses WPEngine's cache for faster website speed.

I provided the 3 redirect loops that happens in when I try to load the page.

1st one is the WPML's 302 found to /en
2nd one is the WPML's 302 temporary redirect /en
3rd one is (I don't know why) 301 redirect back to root.

So what I don't understand is :

1) why do I need to turn off Solid Security Enforce SSL
2) how to know from where the 3rd redirect is coming from?

redirect3.png
redirect2.png
redirect1.png
December 6, 2024 at 6:22 am #16484613

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for the updates and the detailed information.

First of all, you can check the details on redirection at hidden link. So it gives the detailed log of where it is coming from. Perhaps it may help understanding it on the production site.

Secondly, I'm not sure what impact is done by WP Engine and Solid Security SSL, but of course 'd be interested in finding this out. We also have a dedicated 2nd tier support who are the experts of investigating in much detail and resolving the issues.

May I request that if you can match your staging environment with the production, and, recreate the same problem? So we can then investigate it on the staging instead of checking in live site and putting that into a risk.

If that's possible, I'll request temporary access (WP-Admin and FTP), preferably to your staging site where the problem has been replicated.

Your next answer will be private, to share this information safely.

IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

December 6, 2024 at 1:59 pm #16486346

guillaumeP-22

Well that's the catch. It works perfectly on my staging server.

December 6, 2024 at 3:07 pm #16486621

guillaumeP-22

I've found it! Posting here if someone is having this issue some day.

It turns out that it was only because my WP website address was http and not https.

The redirection loop was 1) https 2) WPML redirects to home_url() which was http 3) redirects to https... and so on.

Fixed the Home URL on WordPress, fixed the problem.