$error = 404 after caught add_rewrite_rule
I had the same issue and found a solution. From what I learned so far, there might be two causes to this problem: WP doesn’t recognize your rewrite rules because they are not cached yet. You can check this by dumping get_option( ‘rewrite_rules’ ); and if your rules did get cached, then they’ll be in … Read more