htaccess media directory problem
I'm having a weird issue where I can't access a php file when it is stored in public_html/media. Anywhere else, there's no problem, but in the media folder any attempts to access a php file result in a 404 exception. I can access any other type of file directly in the media folder, just not php. I'm sure this must be an htaccess issue but i can't see what's wrong with my htaccess file - not only that, but i have an (seemingly) identical setup for a few other sites and don't have this issue.

Is there anything obvious i'm missing here or any suggestions what else could be happening?

    # Turn on URL rewriting
    RewriteEngine On
    
    # Put your installation directory here:
    # If your URL is www.example.com/kohana/, use /kohana/
    # If your URL is www.example.com/, use /
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^www.mysite.com
    RewriteRule (.*) http://mysite.com/$1 [R=301,L]
    
    # Protect application and system files from being viewed
    RewriteCond $1 ^(app_public|app_admin|system)
    
    # Rewrite to index.php/access_denied/URL
    RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]
    
    # Do not enable rewriting for other files that exist
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    # Rewrite to index.php/URL
    RewriteRule ^(.*)$ index.php/$1 [PT,L]  
htaccess media directory problem
===

I'm having a weird issue where I can't access a php file when it is stored in public_html/media. Anywhere else, there's no problem, but in the media folder any attempts to access a php file result in a 404 exception. I can access any other type of file directly in the media folder, just not php. I'm sure this must be an htaccess issue but i can't see what's wrong with my htaccess file - not only that, but i have an (seemingly) identical setup for a few other sites and don't have this issue.

Is there anything obvious i'm missing here or any suggestions what else could be happening?

    # Turn on URL rewriting
    RewriteEngine On
    
    # Put your installation directory here:
    # If your URL is www.example.com/kohana/, use /kohana/
    # If your URL is www.example.com/, use /
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^www.mysite.com
    RewriteRule (.*) http://mysite.com/$1 [R=301,L]
    
    # Protect application and system files from being viewed
    RewriteCond $1 ^(app_public|app_admin|system)
    
    # Rewrite to index.php/access_denied/URL
    RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]
    
    # Do not enable rewriting for other files that exist
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    # Rewrite to index.php/URL
    RewriteRule ^(.*)$ index.php/$1 [PT,L]  