Return default placeholder image when image file on server not found

JoakimR nginx-forum at forum.nginx.org
Sat May 28 19:32:59 UTC 2016


What is the right way to convert this from .htaccess to nginx.conf..

##Return default placeholder image when image file on server not found
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule \.(gif|jpe?g|png) /image404.php [NC,L]

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,267211,267211#msg-267211



More information about the nginx mailing list