Welcome Guest, Not a member yet? Register   Sign In
problem with route and query string
#1

[eluser]Ngua Go[/eluser]
i have url:
Quote:index.php/film/details?id=$ID
i want use url:
Quote:watch/$ID

I config in routes.php file:
Quote:$route['watch/(:num)'] = "film/details?id=$1";

but results is 404 Error when run url:
Quote:index.php/watch/613

Help me ! Please!
#2

[eluser]WanWizard[/eluser]
CodeIgniter by default doesn't use or support query strings. Also, the router works only with segments, so you can't do this.

What's wrong with using index.php/film/details/$ID instead?
#3

[eluser]Ngua Go[/eluser]
i want use query string as params.
EX:
index.php/film/filmlist.let?filter[cat_id]=3&filter;[items_theater]=2&filter;[items_focus]=2&filter;[items_length]=2&filter;[key]=Tomℴ[orderby]=items_idℴ[asc]=desc

want it is:
index.php/search/catalog-3
#4

[eluser]WanWizard[/eluser]
To enable $_GET in CI, search for allow_get_array.

That still doesn't allow routing to query strings though, that simply doesn't work. CI works with URI segments, not with query strings.
#5

[eluser]Ngua Go[/eluser]
Ok, Thanks so much !




Theme © iAndrew 2016 - Forum software by © MyBB