Welcome Guest, Not a member yet? Register   Sign In
Handling url's
#7

[eluser]toopay[/eluser]
Try this

Route :
Code:
$route['val/(:any)'] = "val/index/$1";

Controller :
Code:
class Val extends CI_Controller {
   function __construct()
   {
       parent::__construct();
       if($this->uri->segment(2))
       {
          echo $this->uri->segment(2);
       }
       else
       {
          redirect('main');
       }
   }
  
   function index($somevalue)
   {
       echo $somevalue;
       //$this->load->view('includes/template');
   }
}


Messages In This Thread
Handling url's - by El Forum - 04-26-2011, 07:16 AM
Handling url's - by El Forum - 04-26-2011, 01:27 PM
Handling url's - by El Forum - 04-26-2011, 01:59 PM
Handling url's - by El Forum - 04-27-2011, 03:16 AM
Handling url's - by El Forum - 04-27-2011, 04:24 AM
Handling url's - by El Forum - 04-27-2011, 06:36 AM
Handling url's - by El Forum - 04-27-2011, 06:44 AM
Handling url's - by El Forum - 04-27-2011, 06:46 AM
Handling url's - by El Forum - 04-27-2011, 02:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB