title: How can I use PHP/Apache (mod_rewrite) to redirect URLs as hash tags?
body: <p>When a URL like <code>/songs/123</code> is directly hit, I want to rewrite/redirect that URL to <code>/index.php#/songs/123</code>.</p>
  
  <p>I figure using the server to do this is more efficient than creating "dummy" pages that redirect.</p>
  
  <p>For example, I use jQuery.address to 'catch' any <code>&lt;a/&gt;</code> tags and append its <code>href</code> as a hash tag, allowing the site to be navigated seamlessly and have browser history maintain accuracy. I still want these hrefs to be valid links to the appropriate content however in case someone opens it in a new tab or similar.</p>