I need my url to change and well I did it before and worked fine but I can't seem to do it anymoreTongue
rhis is my URL
Main = controller
view = function
Zuid-Holland = var.

I need to get rid of the Main/view soit will look like this


any help??

This is the controllerSadif its needed):
function view($province)
        $data['brokers'] = $this->main_model->get_brokers($province);
        //var_dump($data); exit();
        $this->load->view('main/view', $data, FALSE);

$route['(?).:any'] = "main/view/$0";

[eluser]Simian Studios[/eluser]
Hi Ivar

Without knowing anything else about your app it's hard to decide the best course of action, but unless you have loads of other actions you want access to, a solution would be to just use config/routes.php to do the work for you.


// define all other actions first
$route['example'] = "example/action";

// then this one will mop up any others
$route['(.*?)'] = "main/var/$1";

Yhea I knew i wanted to do it with route but it didn't work but as you can see I figured it outWink

thanks anywayBig Grin

[eluser]Simian Studios[/eluser]
Heh, you solved it while I was on the phone mid-way through writing my post.. glad you sorted it anyways Smile

aaaah, I see haha well thanks anywayTongue

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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