Yury Formanchuk2015-10-15 15:26:49
Apache HTTP Server
Yury Formanchuk, 2015-10-15 15:26:49

Apache: how to give another file when there is no file?

Hello! The meaning is the following.
There is a script that requests a picture at: domen/papka/3243242.png , there are many files and different ones are requested.
But it may happen that the file 3243242.png is not on the server. Accordingly, the server will give an error 404.
And I need the server under the name 3243242.png to give the file 0.png, and so that it is not noticeable (ie, no errors in the title, etc.). So that it is not visible that the file does not exist, but simply the 0.png file was opened under this name.
I tried 404 error handling in .htaccess, but it didn't help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Yury Formanchuk, 2015-10-15

I solved the problem myself. Just handling 404 errors via .htaccess. It's just that on Denver the file in the subfolders was not processed. Raised the file to the root of Denver and it all worked.

xmoonlight, 2015-10-15

try with php handler - should help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question