dimitris Posted July 13, 2011 Report Posted July 13, 2011 While I was trying to find some old files on my server I came up to the awful 404 error page of Apache... Then I made my custom one which(I Think) looks much better Steps: If .htaccess not exist go to step 1.2 1)Edit .htaccess file and add the following line: ErrorDocument 404 http://www.yourdomainname.com/index.php/notfound404 Save, close and upload to your root directory. 1.2)Create a .htaccess with the following contents: ErrorDocument 404 http://www.yourdomainname.com/index.php/notfound404 Save, close and upload to your root directory. 2)create a folder in core/modules named "notfound404" and make a php file named "notfound404.php" with the following contents: <?php class notfound404 extends CodonModule { public function index() { Template::Show('404.tpl'); } } ?> 3)Now in your skin folder make a 404.tpl file and place inside it whatever you wanna see if something not found. (f.i): <strong><h2>The page could not be found on the server.<br /> Error number 404.</h2> </strong> It appears that you have come up on a page that is not present on this web site. It could have been re/moved, spelled incorrectly.<br/><br /> We apologize for any inconvenience that this may have caused.<br /><br /> | <a href="<?php echo SITE_URL; ?>/index.php">Home Page</a> | <a href="<?php echo SITE_URL; ?>/index.php/contact">Tell as about the error</a> | <a href="javascript:history.go(-1)">Go Back</a> |<br/> 4)Place your browser to http://www.yourdomainname.com/index.php/notfound404 and see if it works. Demo: Demo Link Regards, Dimitris Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.