diff --git a/app/controllers/ErrorController.php b/app/controllers/ErrorController.php index 3149046..62b5d74 100644 --- a/app/controllers/ErrorController.php +++ b/app/controllers/ErrorController.php @@ -14,5 +14,10 @@ class ErrorController extends ControllerBase { // Set status code to 404. $this->response->setStatusCode(404); + + // Get the request uri to pass to google :) + $uri = ltrim($this->request->getURI(), '/'); + $uri = str_replace('/', '+', $uri); + $this->view->url = $uri; } } diff --git a/app/views/error/show404.volt b/app/views/error/show404.volt index 516e543..5182422 100644 --- a/app/views/error/show404.volt +++ b/app/views/error/show404.volt @@ -1,4 +1,11 @@ -
-

404 not found

-
+{% set google_url = "http://google.com?q=" ~ url | escape %} + + +

404 Not Found

+

+ This page does not exist! You can search for it on + google + if you want. +

+