{"id":229,"date":"2010-03-01T22:49:35","date_gmt":"2010-03-01T20:49:35","guid":{"rendered":"http:\/\/kavdesign.net\/wordpress\/?p=229"},"modified":"2010-05-14T18:55:01","modified_gmt":"2010-05-14T16:55:01","slug":"how-to-create-a-404-redirect-page-in-joomla","status":"publish","type":"post","link":"https:\/\/www.kavdesign.net\/blog\/coding\/how-to-create-a-404-redirect-page-in-joomla\/","title":{"rendered":"How to create a 404 redirect page in Joomla"},"content":{"rendered":"<p>Copy the error.php file from your-site\/templates\/system to your template main directory.<\/p>\n<p>Then just open the error.php file from your Joomla template and edit it.<\/p>\n<p>If you want to redirect to a sitemap on your site\u00a0 for example use this code at the top of the error.php file before everything in the file write:<\/p>\n<p><code>&lt;?php<\/p>\n<p>defined( '_JEXEC' ) or die( 'Restricted access' );<br \/>\nif (($this-&gt;error-&gt;code) == '404') {<br \/>\nheader('Location: http:\/\/www.yoursite.com\/sitemap');<br \/>\nexit;<br \/>\n}<\/p>\n<p>?&gt;<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Copy the error.php file from your-site\/templates\/system to your template main directory. Then just open the error.php file from your Joomla template and edit it. If&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/www.kavdesign.net\/blog\/coding\/how-to-create-a-404-redirect-page-in-joomla\/\">Continue reading<span class=\"screen-reader-text\">How to create a 404 redirect page in Joomla<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[9],"tags":[],"class_list":["post-229","post","type-post","status-publish","format-standard","hentry","category-coding","entry"],"_links":{"self":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/comments?post=229"}],"version-history":[{"count":4,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/229\/revisions"}],"predecessor-version":[{"id":231,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/229\/revisions\/231"}],"wp:attachment":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/media?parent=229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/categories?post=229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/tags?post=229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}