ERR_TOO_MANY_REDIRECTS importing post in WordPress with WPML [SOLVED]

I am passing old entries from my personal blog to the company’s one, and I have encountered a curious problem related to redirects. However, after trying from different angles I have solved it, and in this post I tell you, in case the same thing happens to you.

The Scenery

My personal blog is only in Spanish. I selected some post to go to the website of the company, which is in several languages, the main language being English. The language management is made with WordPress MultiLingual, (WPML for friends). Importing them into the Spanish version was not a problem, because the WPML has it planned in order to import content, I chose the corresponding language and “go ahead”

Of course, I’m interested in the SEO of these items is preserved, and that is passed to the new website. That’s why I dedicated myself to doing 301 redirects one by one in the .htaccess of my personal blog. with the typical, something like:

redirect 301 /probar-funcionan-los-cron-jobs-facil-rapido/ https://digitalfreelancing.eu/probar-funcionan-los-cron-jobs-facil-rapido/?lang=es

And at first it seemed to work, but suddenly … chan chan chaaaaan redirection error. I tried several things, but finally I found the key:

The Solution

In the hosting of the company there is a main web in the root (which is my personal blog, at this moment, owned by the company) and inside are the folders of each web. Well … by modifying the .htaccess of the root it seems that not only affects my personal blog, but the other websites (which shouldn’t do). So everything was solved by adding the old domain in the redirection like this:

redirect 301 https://oliverdelarosa.com/probar-funcionan-los-cron-jobs-facil-rapido/ https://digitalfreelancing.eu/probar-funcionan-los-cron-jobs-facil-rapido/?lang=es

And that’s all, but it took me a while to solve it … so I share it with you in case it helps. See you soon!