CodeIgniter Forums
Mix pretty urls with url params - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Mix pretty urls with url params (/showthread.php?tid=8126)



Mix pretty urls with url params - El Forum - 05-06-2008

[eluser]louis w[/eluser]
I want to be able to do this: /admin/edit/page/28?foo=bar

This works /admin/edit/page/28, but it 404's when I add the params.

What am I missing?

UPDATE:
Just realized it works if i add another param, but doesn't when there is only one.


Mix pretty urls with url params - El Forum - 05-06-2008

[eluser]sikkle[/eluser]
do a search on the forum about uri string from config.php.

you'll be able to start from there.


Mix pretty urls with url params - El Forum - 05-06-2008

[eluser]louis w[/eluser]
I have enabled query strings in my config but it will only work if there is more then one variable in the uri.

Code:
$config['enable_query_strings'] = TRUE;



Mix pretty urls with url params - El Forum - 05-06-2008

[eluser]missionsix[/eluser]
you have to change the way CI reads the 'pretty url' part in config.php 'ORIG_PATH_INFO' worked for me on my server, dunno about others.


Mix pretty urls with url params - El Forum - 05-06-2008

[eluser]Mirage[/eluser]
Change your config for uri_protocol from auto to
Code:
$config['uri_protocol']    = "PATH_INFO";



Mix pretty urls with url params - El Forum - 05-06-2008

[eluser]louis w[/eluser]
Changing uri_protocol worked. Thanks guys.