I used the following rule to check if the png exists.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(?!.+/default\.png$).+\.png$ /web/team/default.png [L,NC,R=301]
If it does not it will redirect to default.png
The rule now redirects all pngs in my website to this default.png
even if the png file is exists.
I want to re-produce the rule to be applied if the request url has the following pattern
host + /web/images/team/anyimagehere.png
If this png does not exist then fire the rule to redirect
Note that this path /web/images/team/
does not exist in the file system. It's based on the application so will only be generated by the application on request.
Any advise here how to adjust this rule?