From a8f403f8fe0131b786139f6c8ececd07f0c6d37c Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 25 Jun 2014 14:33:54 +1000 Subject: [PATCH] Added 300 messages and defaulting url link to domain rendered --- application/classes/HTTP/Exception/404.php | 3 +++ application/views/300.php | 13 +++++++++++++ application/views/redirection/new.php | 6 +++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 application/views/300.php diff --git a/application/classes/HTTP/Exception/404.php b/application/classes/HTTP/Exception/404.php index 0f976f2..c2f9941 100644 --- a/application/classes/HTTP/Exception/404.php +++ b/application/classes/HTTP/Exception/404.php @@ -46,6 +46,9 @@ class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 { // Process our redirection options if (preg_match('/^http[s]?:\/\//',$ro->redirect)) { + if ($ro->http_status == 300) + $response->body(View::factory('300')->set('redir',$ro->redirect)); + $response->status($ro->http_status ? $ro->http_status : 302); $response->headers('Location',$ro->redirect); diff --git a/application/views/300.php b/application/views/300.php new file mode 100644 index 0000000..1041d23 --- /dev/null +++ b/application/views/300.php @@ -0,0 +1,13 @@ + + + + Not Here Anymore + + + + + It's not here anymore - try + + diff --git a/application/views/redirection/new.php b/application/views/redirection/new.php index 2ebfabb..307b702 100644 --- a/application/views/redirection/new.php +++ b/application/views/redirection/new.php @@ -3,7 +3,7 @@ Create New Short Cut @@ -15,4 +15,8 @@ To point to which URL? +
+
+ This domain may be for sale! +