Saltar al contenido Saltar a la barra lateral

Este tema contiene 0 respuesta, tiene 0 voces.

Última actualización por albertS-32 hace 2 meses.

Asistido por: Maiya AI Support.

Autor Publicaciones
febrero 12, 2026 a las 16:12 #17817734

albertS-32

I try to access the url enlace oculto (this should show the archive for /category/fotos/ as soon as I activate the option in YOAST SEO to remove the "category" part from the URL).
BUT this URL (fotos) is forwarded as a canonical to my homepage using this rewrite rule:
Rule Pattern ^([a-zA_Z_]{5})/?$
Rewrite Target index.php?lang=$matches[1]&page_id=9

Is this a rule generated by wpml? I tried overwriting / removing it with:
add_filter('rewrite_rules_array', function($rules) {
foreach ($rules as $pattern => $rewrite) {
// Prüfe auf die hartnäckige Regel für 5-Buchstaben-Sprache
if (strpos($rewrite, 'lang=$matches[1]&page_id=9') !== false) {
unset($rules[$pattern]); // Regel entfernen
}
}
return $rules;
});

This was the only way plus removing the rewriting rule from the database that I found. I am not sure though if this is caused by WPML?? I search for the cause of the problem for around 2 days

El tema '[Cerrado] Redirect Rule issue – redirect some unknown urls to homepage' está cerrado a nuevas respuestas.