I
I
Ivan2017-01-28 23:30:21
Apache HTTP Server
Ivan, 2017-01-28 23:30:21

How to make a stub for a non-existent image in Apache?

htaccess has a code that sets a stub for images that are not on the server
[CODE]RewriteCond %{REQUEST_URI} \.(jpg|jpeg|gif|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{ REQUEST_FILENAME} !-d
RewriteRule .*$ /images/img_die.jpg [L][/CODE]
It needs to be modernized so that images that do not have an extension are replaced, for example, those located at /forum/image-proxy/?image= c01109dd349ee4eb4ba79cc7c3433dc01f43461c-aHR0cHM6Ly9wcC52ay5tZS9jNjIxOTI1L3Y2MjE5MjU2MTkvZWE4Yy83TU51MDdGS1dmTS5qcGc%3D You
can identify an image by the presence of /image-proxy/ in the URL
.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question