My current .htaccess file contains this code
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$|.*mp3$ [NC]
RewriteRule (.*) /viewed.php?file=$1
I want to change it so it rewrites the URL to /viewed.php?file=$1 ($1 being file path) if the extension is not .php, but I don't know how to do that. (I found that code on another post and added my own extensions to the list)
If someone could link me to an explanation of how Rewrite Conditions work that would be great because I don't understand how to make them.