Welcome Guest, Not a member yet? Register   Sign In
query string enable true problem
#1

[eluser]Unknown[/eluser]
Hi all ,
i am stuck on one place and cannot find the way out.
i have pagination on my index page and i set $config['enable_query_strings'] = TRUE;
in my controller i have another folder named as admin my directory structure as follows
application\controllers\admin

now the problem is if i try to open controllers\admin like this
http://example.com/admin
due to $config['enable_query_strings'] = TRUE; it places a "?" mark after the url like this
http://example.com/?admin/home/do_login
and the url wont work due to the ?
if i do this directly after login using the following url the page loads.
http://example.com/index.php/admin/home/do_login

i want to get rid of the question mark after the url and i dont want to set $config['enable_query_strings'] = FALSE; because it supports my pagination

looking forward for the reply
#2

[eluser]toopay[/eluser]
Quote: i dont want to set $config[‘enable_query_strings’] = FALSE; because it supports my pagination

Really?I'm sure, there is not necessary to set enable query string to display pagination on your page. If, under spesific circumstances, you must set enable query string, then you must ready for that problems.

My sugestion, try avoid to set enable query string, because it will bring you more trouble than benefits. I mean, come on. If you just want to passed some $_GET variable to some controler, why you must accessed it like "www.example.com/index.php?c=yourcontrollername&m=yourmethod&var=yourtroublehere" (so so weird URL, i think).
#3

[eluser]Shmee[/eluser]
I can see this being a problem though.

I like to have '$config[‘enable_query_strings’] = TRUE', because it allows me to randomize my AJAX calls, so that IE doesn't cache the data, so my AJAX url looks like "?c=controller&m=function&random;_number".
#4

[eluser]CappY[/eluser]
Any solution? I have same problem! I want to enable QUERY STRING PER CONTROLLER.
#5

[eluser]Shmee[/eluser]
I don't think there is a solution, but for me I use 'post' as often as I can because IE doesn't cache a 'post' the same way as a 'get'. Though for jsonp strings I cannot use a 'post', so no I do not think there is a solution.
#6

[eluser]CappY[/eluser]
Nevermind. I realized I can use also: site.com/controller/method/?parameter1=value1&par2=value2 - without QUERY_STRINGS = TRUE,so that also fit my needs. Smile
#7

[eluser]JamieBarton[/eluser]
[quote author="CappY" date="1298930735"]Nevermind. I realized I can use also: site.com/controller/method/?parameter1=value1&par2=value2 - without QUERY_STRINGS = TRUE,so that also fit my needs. Smile[/quote]

What solution did you come to, to GET from the URI?




Theme © iAndrew 2016 - Forum software by © MyBB