WordPress - Solución de problemas - He hecho clic en un enlace y me redirige a mi idioma original
En este artículo, encontrará cómo solucionar los problemas cuando se le redirige a su idioma original al hacer clic en un enlace.
1. Falta la barra "/" al final del enlace
As you can see in the screenshot below, the URL in the source of the <a> tag is http://www.rmfhk.com/zh/storyteller
No hay ninguna barra ("/") al final de la URL. Puede comprobarlo yendo al inspector de su navegador (clic derecho > inspeccionar)
Esta no es la sintaxis adecuada y por eso se le redirige a la URL del idioma de su página web original.
You need to add a slash ("/") at the end of the URL (directly in the source of your <a> HTML tag).
As you can see below, the URL in the source of the <a> tag is now: http://www.rmfhk.com/zh/storyteller/, with a slash at the end of the URL.
Ahora funciona correctamente y será redirigido a la versión de la página con el idioma seleccionado.
2. Forma incorrecta de la URL
Si su URL slug tiene un número de puerto como este: http://192.168.42.98:8510
El número de puerto ":8510" está causando el problema. Debe eliminarlo y funcionará correctamente.
3. URL absoluta y relativa
Asegúrese de que la URL del enlace es la URL absoluta (por ejemplo https://www.mywebsite.com/product/) y no la URL relativa (/producto/).