Custom 404 control

#4
[eluser]DieterStruik[/eluser]
Hi Waldmeister,

So... first time no success on missing controllers. How about this:

1) Modify the CI error_404.php by replacing the content with:

Code:
<?php
echo file_get_contents('http://'.$_SERVER['SERVER_NAME'].'/nl/site/error404/'.$_SERVER['REQUEST_URI']);
?>

Ofcourse /nl/site/error404 is an existing method of my catch all controller named Site.

2) Add the following code in the catch all controller from my first post.

Code:
public function error404()
{
    // Get all arguments passed.  
    $args = func_get_args();

    // This view shows the $uri string after the /nl/site/error404
    $this->load->view('error404', array(            
        'uri' => join('/', $args)
    ));    
}


Messages In This Thread
Custom 404 control - by El Forum - 01-15-2010, 06:28 AM
Custom 404 control - by El Forum - 01-15-2010, 07:01 AM
Custom 404 control - by El Forum - 01-15-2010, 07:08 AM
Custom 404 control - by El Forum - 01-15-2010, 08:23 AM
Custom 404 control - by El Forum - 01-15-2010, 08:25 AM
Custom 404 control - by El Forum - 01-15-2010, 08:35 AM
Custom 404 control - by El Forum - 01-15-2010, 09:11 AM
Custom 404 control - by El Forum - 05-18-2010, 08:37 AM
Custom 404 control - by El Forum - 06-16-2010, 01:08 PM
Custom 404 control - by El Forum - 06-16-2010, 02:11 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.