Welcome Guest, Not a member yet? Register   Sign In
Divide URI segment into 2 parts through routes.php
#10

[eluser]danishravian[/eluser]
there is some modification in the structure.

actually whenever url will be something like aaa-x-y-z, then I am sending it to a controller and passing aaa and x-y-z as two parameters.

Code:
class bbb extends CI_Controller {
  
  function _remap($method) {
   $method; // should contain aaa
   $uri2 = $this->uri->segment(2); // should contain x-y-z
      
  }

}
But in this case $mothod contains aaa-x-y-z

and I am using this in route.php file
Code:
$route['aaa-(:any)'] = "bbb/aaa/$1";

So the problem here is, uri segment 2 is empty and uri segment 1 contains both the parameters. But uri 1 should contain aaa and uri 2 should have x-y-z. How can I do this?


Messages In This Thread
Divide URI segment into 2 parts through routes.php - by El Forum - 01-30-2012, 03:24 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-30-2012, 08:08 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-30-2012, 08:29 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-30-2012, 11:04 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-30-2012, 11:06 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-30-2012, 12:18 PM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-30-2012, 12:24 PM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-30-2012, 01:42 PM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-31-2012, 03:05 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-31-2012, 03:19 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-31-2012, 03:31 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-31-2012, 03:33 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-31-2012, 03:41 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-31-2012, 05:29 AM
Divide URI segment into 2 parts through routes.php - by El Forum - 01-31-2012, 05:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB