The issue has to do with the fact that you used the [L]
directive. The subsequent rules do not take into account whether the exists check or directory check succeed or fail. One solution is as follows:
Options FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^media/([^/]+) download.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^json/([^/]+)/([^/]+)/([^/]+) jsonfeed.php?module=$1&method=$2¶ms=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+) index.php?q=$1,$2,$3,$4 [NC,L]
A more compact solution is to deal with the existing things first, like so:
Options FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .* - [L]
RewriteRule ^media/([^/]+) download.php?file=$1 [L]
RewriteRule ^json/([^/]+)/([^/]+)/([^/]+) jsonfeed.php?module=$1&method=$2¶ms=$3 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+) index.php?q=$1,$2,$3,$4 [NC,L]