Welcome Guest, Not a member yet? Register   Sign In
Routing doesn't work
#11

[eluser]Marty[/eluser]
I've tried block of code, that post and output is following:

calling /article with routes

Code:
$route['homepage'] = 'homepage/index';
$route['(:any)'] = 'homepage/show/$1';

Code:
Homepage::show
Array
(
    [1] => article
)
Array
(
    [1] => homepage
    [2] => show
    [3] => article
)

calling / with routes above
Code:
Homepage::index
Array
(
)
Array
(
    [1] => homepage
    [2] => index
)

So it seems that routes work fine...
#12

[eluser]Marty[/eluser]
Ahh, probles solved! In my controller function show, I count with that when I call /article and route it to /homepage/show/article is in uri segment(3) "article", but it's fault. URI isn't that is routed by CI but the one "I see in browser".

Thx guys for help!




Theme © iAndrew 2016 - Forum software by © MyBB