CodeIgniter Forums
URL - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: URL (/showthread.php?tid=67407)



URL - lovranitst - 02-19-2017

How can I mixing Segment-Based URLs with the Query Strings?

I would like to use once the one, and other time the other formula.


RE: URL - ignitedcms - 02-19-2017

What are you trying to do exactly?


RE: URL - Johnclair24 - 02-20-2017

Working on a microsite running on code Igniter,faced a dilema of adding and extra query string in the page URL,which is already using segment based URL.And make sure you are on the latest version of CI,currently 2.0.2,forget about the misleading enable query string.


RE: URL - Wouter60 - 02-20-2017

Quote:(...) And make sure you are on the latest version of CI,currently 2.0.2, (...)
The latest - stable - version of CI is 3.1.3, not 2.0.2 !

Adding a query string to a segment based url is no problem at all. E.g. this is a valid url:
Code:
http://www.mydomain.com/mycontroller/mymethod/?cat=pro&order=asc
This could be a url from a form that is using the get action rather than post.
Use this->input->get('cat') to fetch the value of the parameter 'cat'.