How to create a link to a static php page

Permalink
I'm working on a site that includes a podcast. The MP3 files are imported into the system using a job.

There is a subdomain at 'podcast.mydomain.com' that points to a directory within the 'www.mydomain.com' file structure at /www/files/podcast

In the /www/files/podcast directory is a php file with this content:
define('SERVER_NAME','http://www.mydomain.com');
if ($_SERVER['HTTP_HOST']=='podcast.mydomain.com') {
   header("Content-Type: application/rss+xml; charset=UTF-8");
   include("inc/RSS.class.php");
   $rss = new RSS();
   echo $rss->GetFeed();
} else {
   $hash = $_SERVER['PATH_INFO'];
   $hash = str_replace('/','',$hash);
   $hash = str_replace('.mp3','',$hash);
   include("inc/passMP3.class.php");
   $mp3 = new passMP3();
   if ($mp3->findMP3($hash)) {
      echo $mp3->GetMP3($hash);
      die();


The idea is that if someone hits 'www.mydomain.com/files/podcast/{some_hash_value}.mp3', they would get the correct mp3 served to them. If they hit 'podcast.mydomain.com', they would get an rss feed.

My issue is setting up the .htaccess file to allow for the 'www.mydomain.com/files/podcast/{some_hash_value}.mp3' to pass by concrete5 and be accessed directly.

My current .htaccess file is:
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteRule ^files/sermons/(*)$ files/sermons/index.php?$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>


If I uncomment the 3rd line, I get a 500 error onhttp://www.mydomain.com.

What am I doing wrong?

SkyBlueSofa