title: Wordpress add_rewrite_rule: custom post type links with subdomain
body: <p>I have created a custom post type and for this custom post type i have the sigle page like this 
  <a href="http://example.com/?custom_post=titlehere" rel="nofollow">http://example.com/?custom_post=titlehere</a></p>
  
  <p>How can i rewrite this url ( with add_rewrite_rule ) into a link like</p>
  
  <p><a href="http://titlehere.example.com" rel="nofollow">http://titlehere.example.com</a></p>
  
  <p>So far i have this code</p>
  
  <pre><code>function custom_rewrite_basic() {
    add_rewrite_rule('^http://[\w.-]+\.example.com?', 'custom_post=$matches[1]', 'top');
  }
  add_action('init', 'custom_rewrite_basic');
  </code></pre>
  
  <p>Did i write the regex wrong ?</p>