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

[eluser]Unknown[/eluser]
I am trying to route a URL such as: inventory/30/seo-string to inventory/view/30/seo-string. I don't know what I am doing wrong but I can't seem to get this to work. Here is my route code:

Code:
$route['inventory/([0-9]+)/(:any)'] = "inventory/view/$1/$2";

and my controller:

Code:
<?php
class Inventory extends Controller
{
    function index() { }

    function view()
    {
        echo $this->uri->segment(3);
    }
}

I am getting a 404 Page Not Found when I try to visit the url posted above. What am I doing wrong?


Messages In This Thread
Routing problems - by El Forum - 08-15-2009, 10:57 AM
Routing problems - by El Forum - 08-15-2009, 11:21 AM
Routing problems - by El Forum - 08-15-2009, 12:46 PM
Routing problems - by El Forum - 08-15-2009, 02:09 PM
Routing problems - by El Forum - 08-15-2009, 05:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB