title: Wordpress add_rewrite_rule
body: <p>I'm having a strange issue trying to add a rewrite rule.</p>
  
  <p>Firstly, a note about my set-up. I'm using a date.php file for another specific set-up on the site.</p>
  
  <p>The area I'm having issues with is a customized Archives page.
  In order to not mess with the date.php template I attempted to set up a new page within wordpress and then created my own template to display the archives.</p>
  
  <p>In order to catch the url with the date and not redirect to the date.php I set up the following add_rewrite_rules : </p>
  
  <pre><code>function my_archives() {
  
      add_rewrite_rule("my-archives/([0-9]{4})/([0-9]{1,2})/page/([0-9]{1,})/?$", 'index.php?pagename=my-archives&amp;year=$matches[1]&amp;monthnum=$matches[2]&amp;paged=$matches[3]', 'top');
  
      add_rewrite_rule("my-archives/([0-9]{4})/([0-9]{1,2})/?$", 'index.php?pagename=my-archives&amp;year=$matches[1]&amp;monthnum=$matches[2]', 'top');    
  
  }
  
  add_action('init', 'my_archives');  
  </code></pre>
  
  <p>I thought everything was a-ok as my links were working correctly.
  Example: 
  <a href="http://mysite.com/my-archives/2013/09/" rel="nofollow">http://mysite.com/my-archives/2013/09/</a> 
  as well as 
  <a href="http://mysite.com/my-archives/2013/09/page/2/" rel="nofollow">http://mysite.com/my-archives/2013/09/page/2/</a>
  for paged results.</p>
  
  <p>Now a month later I see that for some reason it'll only correctly redirect to dates that are one month behind the current date.
  So being that the current date is 2013/10/ it's only redirecting /2013/09/ and everything else is being redirected to the 404 page.</p>
  
  <p>Any suggestions on probable cause for this or if someone sees something in my code that is incorrect it'd be greatly appreciated. </p>