title: rewrite_rules wordpress URL
body: <p>I'm trying to rewrite an URL</p>
  <p>from: <code>http://localhost/hockey-oefening/70/interceptie-warming-up</code></p>
  <p>to: <code>http://localhost/hockey-oefening/?oefening=70&amp;naam=interceptie-warming-up</code></p>
  <p>I tried to add manually .htaccess file. However, I did not get it to work. So I reset the .htaccess file and looked for another way.</p>
  <p>Then I added the following code in my functions.php</p>
  <pre><code>function custom_rewrite_rule() {
      add_rewrite_tag('%oefening%', '([^&amp;]+)');
      add_rewrite_tag('%naam%', '([^&amp;]+)');
      add_rewrite_rule('^hockey-oefening/([^/]*)/([^/]*)?', 'index.php?page_id=563&amp;oefening=$matches[1]&amp;naam=$matches[2]', 'top' );
  }
  add_action('init', 'custom_rewrite_rule', 10, 2);
  </code></pre>
  <p>This adds a rule to the $wp_rewrite array as I can see with</p>
  <pre><code>global $wp_rewrite;
  print_r($wp_rewrite);
  </code></pre>
  <p>The output:</p>
  <pre><code>   [extra_rules_top] =&gt; Array
      (
          [^wp-json/?$] =&gt; index.php?rest_route=/
          [^wp-json/(.*)?] =&gt; index.php?rest_route=/$matches[1]
          [^index.php/wp-json/?$] =&gt; index.php?rest_route=/
          [^index.php/wp-json/(.*)?] =&gt; index.php?rest_route=/$matches[1]
          [service/?$] =&gt; index.php?post_type=services
          [service/feed/(feed|rdf|rss|rss2|atom)/?$] =&gt; index.php?post_type=services&amp;feed=$matches[1]
          [service/(feed|rdf|rss|rss2|atom)/?$] =&gt; index.php?post_type=services&amp;feed=$matches[1]
          [service/page/([0-9]{1,})/?$] =&gt; index.php?post_type=services&amp;paged=$matches[1]
          [^hockey-oefening/([^/]*)/([^/]*)?] =&gt; index.php?page_id=563&amp;oefening=$matches[1]&amp;naam=$matches[2]
      )
  </code></pre>
  <p>Now when I try to go to <code>http://localhost/hockey-oefening/70/interceptie-warming-up</code>, I get a redirection to <code>http://localhost/registreren/</code></p>
  <p>Now I was thinking that my page_id might be wrong, but the hockey-oefening page has id: 563 and the register page id: 11.</p>