T
T
trace82017-01-15 21:13:24
Yii
trace8, 2017-01-15 21:13:24

How to customize 404 page in yii2?

Is there any easy way to replace the view for 404 Exceptions? If the condition "if statuscode == 404, then this->render['404custom']" is set in the views->error.php file, then the content of the 404custom view is not rendered, only the title changes.
yii2 basic

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2017-01-15
@slo_nik

Good evening.
And rename the old file to error_old.php and put your file next to it?
Why such difficulties?

I
Ivan Kolesnikov, 2017-07-13
@kolesnikov_i

Here is an answer to a similar question, I think this answer is also suitable for your case
. How to rewrite authentication in Laravel?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question