nginx regex configuration for 404 images
- by Muhammet Arslan
I have dynamic link series like below;
http://example.com/users/1871233/18712443_cover.jpg
Only static thing is on that link is example.com/users and _cover.I want to make that ; when requested is not found return a jpg
location ~ ^\/users\/(.*)\/(.*)_cover.*(jpg|jpeg|png|gif)$ {
error_page 404 /deff_images/empty-cover-jpg.jpg;
}
I did smt like above but not worked .
What can i do for that ?
So thanks