title: jPlayer and RewriteRule for mp3 URLs
body: <p>I believe there is a bug in jPlayer audio player that prevents a user from navigating through a song using the seek bar if the song file is being outputted by a PHP file. In my htaccess file I have this line:</p>
  
  <pre><code>RewriteRule ^stream/(.*)/([0-9+]).mp3?$ modules/stream.php?a1=$1&amp;a2=$2
  </code></pre>
  
  <p>And then in my stream.php file, here is the header data I set:</p>
  
  <pre><code>$fsize = filesize($path);
  $shortlen = $fsize-1;
  header("Pragma: public"); // required
  header("Expires: 0");
  header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
  header("Cache-Control: private", false); // required for certain browsers 
  header("Content-Type: audio/mpeg");
  header("Content-Disposition: inline; filename=" . $file . ";" );
  header("Content-Transfer-Encoding: binary");
  header("Content-Length: " . $fsize);
  header('Content-Range: bytes 0-'.$shortlen.'/'.$fsize);
  header('X-Pad: avoid browser bug');
  header("Content-Length: " . filesize($path));
  readfile("$path");
  exit();
  </code></pre>
  
  <p>A link to an mp3 generally looks like this:</p>
  
  <pre><code>www.website.com/stream/song/100/
  </code></pre>
  
  <p>Everything seems to work in jPlayer, except for navigating the song with the seek bar. When I change the URLs to the direct paths to the mp3s, the seek bar begins working again. Does anyone know how I can fix this problem?</p>
  
  <p>EDIT:
  The problem does not occur in Safari v6 on Mac OSX 10.8. It does occur on Chrome v27</p>