Answer the question
In order to leave comments, you need to log in
Non-standard handling of 404 errors?
When migrating a project from nginx to apache, it became necessary to cleverly handle a 404 error.
Let me explain:
on nginx, the following redirect was present in nginx.conf:
#Приватный локейшен для отдачи файлов слоев Dojo. В случае если файл<br/>
#слоя отсутствует. Заменяем код ответа с 404(файл не найден) на код<br/>
#200 и перенаправляем на приватный локейшен для генерации пустого файла<br/>
#слоя<br/>
location ^~ /jsLayers/<br/>
{<br/>
internal;<br/>
alias $serverRoot/resources/js/$jsCurrentFolder/layers/;<br/>
error_page 404 =200 /emptyLayer.js;<br/>
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question