Skip to content

Instantly share code, notes, and snippets.

@lukearmstrong
Created April 19, 2012 15:39
Show Gist options
  • Save lukearmstrong/2421796 to your computer and use it in GitHub Desktop.
Save lukearmstrong/2421796 to your computer and use it in GitHub Desktop.
<?php
class Controller_Error extends Controller_Template
{
public function action_404()
{
// XXX: https://github.com/fuel/core/issues/515
// I assume the line below only works when using PHP as an Apache Module as the 404 header is different for FastCGI.
//$this->response->status = 404;
// Fix for using PHP FPM (FastCGI)
$this->response->set_header('Status', '404 Not Found');
$this->response->send_headers();
// Serve 404 Page
$this->template->content = View::forge('errors/404');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment