Welcome Guest, Not a member yet? Register   Sign In
URI Routing
#1

[eluser]Bl4cKWid0w[/eluser]
I'm trying to set up my urls.

I want them to be like this:
mysite.com/index.php/class/function/function

Is this possible?

I used a route like this:
$route['class/:any'] = 'class/first';
$route['class/first/:any'] = 'class/first/second';

When I visit the url, I get a 404 page not found error.
#2

[eluser]Michael Wales[/eluser]
I'm not sure I understand the question... you are wanting to run two functions off of a single URI request?

If you are just trying to pass additional information to your function, you won't have to setup URI routing at all:

URL: example.com/index.php/posts/view/2
Code:
class Posts {
  function view($id = NULL) {
    echo $id;
  }
}




Theme © iAndrew 2016 - Forum software by © MyBB