I have a rewrite rule as this to caught old urls from a previous version of the site:
add_rewrite_rule( '(ninos|familia|hogar|mujeres|hombres)-[a-z-]+\.php', 'old_id_redirect.php', 'top' );
The rewrite rule works more or less as intended, and I see in the debugger that the request goes through
In there, there is only (so far) a call to
wp-blog-header.php, and nothing and almost nothing else.
I stop execution just after that there to see the enviroment state, and I see that
$error is set to "404".
Why is that? If the add_rewrite_rule was caught and the redirection made, why is
$error is set to 404?