Setting 404 Status Code |
THANK YOU! I finally got a correct 404 response (it used to be 200 and my SEO guy was complaining about it)
Here is the code in app\Config\Routes.php (CodeIgniter version 4.4.1): $routes->set404Override(function () { $response = CodeIgniter\Config\Services::response(); $response->setStatusCode(404); return view('errors/html/error_404'); });
You can see things I made with codeigniter here: itart.pro its not overly impressive as I have very little time to learn.
|
Messages In This Thread |
Setting 404 Status Code - by SoccerGuy3 - 06-22-2023, 07:46 AM
RE: Setting 404 Status Code - by Mni.day - 06-22-2023, 02:36 PM
RE: Setting 404 Status Code - by kenjis - 06-22-2023, 02:53 PM
RE: Setting 404 Status Code - by Mni.day - 06-23-2023, 08:11 PM
RE: Setting 404 Status Code - by Leo - 10-05-2023, 12:03 AM
RE: Setting 404 Status Code - by SoccerGuy3 - 10-13-2023, 08:11 AM
|