When attempting to view a *.wav URL on our webserver, the data doesn't transfer properly.
We are using apache2 with php5.10. Among the apache rewrite rules is:
RewriteRule ^(.+)\.(wav)$ /wav.php?wav=$1.$2 [L,NC]
And the relevant code from wav.php is:
<?php
$image = getPassed("wav");
header( 'Content-Type: audio/wav');
set_include_path("/");
readfile($image, true);
exit;
?>
This is supposed to return any .wav file on the server when server.company.com/filepath is accessed via a web browser.
When attempting to listen to any *.wav file in firefox or chrome in ubuntu (haven't tested other OSes yet), the plugin errors: "Location not found." However, right-clicking and choosing "save link as" allows the user to download the .wav file.
Any thoughts?
Edit:
getPassed is a function to return variables from $_GET or $_POST