title: wordpress rewrite
body: <p>trying to add a rewrite rule for wordpress site working but having no joy</p>
  
  <pre><code>function wptuts_add_rewrite_rules() {
  
  add_rewrite_rule('^dukebox/([0-9-]*)/?','index.php?pagename=dukebox&amp;startdate=$matches[1]','top');
  flush_rewrite_rules();
  }
  add_action( 'init', 'wptuts_add_rewrite_rules' );
  </code></pre>
  
  <p>what i want is for the </p>
  
  <p><a href="http://www.mikekeelin.co.uk/dukebox/?startdate=2013-02-25" rel="nofollow">http://www.mikekeelin.co.uk/dukebox/?startdate=2013-02-25</a></p>
  
  <p>to read </p>
  
  <p><a href="http://www.mikekeelin.co.uk/dukebox/2013-02-25" rel="nofollow">http://www.mikekeelin.co.uk/dukebox/2013-02-25</a></p>
  
  <p>also have tried </p>
  
  <pre><code>index.php?p=85&amp;startdate=$matches[1]','top');
  </code></pre>
  
  <p>but no joy</p>
  
  <p>any help help greatly appreciated </p>
  
  <p>thanks</p>