SEO URIs *AND* $_GET requests - /controller/function/?myvar=1 |
[eluser]Avatar[/eluser]
I'm trying to do this in the modulated and templated environment as in this thread although it should work none the less http://ellislab.com/forums/viewthread/73367/ I hope to make it work, I've also been looking at $_GET to work for a while now.
[eluser]Avatar[/eluser]
I think I got why it doesn't work when going to the url: Code: http://localhost/index.php/home/index/?myvar=1&var=2 but this whole time I was doing: Code: http://localhost/home/index/?myvar=1&var=2 is there a way to fix this?
[eluser]Avatar[/eluser]
I'm not able to get uri->segments located after the query string like this: Code: http://localhost/index.php/home/?myvar=butt&var=2/cheese ![]() but this does work: Code: http://localhost/index.php/home/index/cheese/?myvar=butt&var=2
[eluser]xwero[/eluser]
[quote author="Pygon" date="1204762232"] xwero: My appologies -- try only: index.php/some/segment/?one=1 and you should recieve a 404 since CI_URI assumes that if count($_GET) == 1, the first key is the name of the base controller you would like to access: CI_URI.php Code: // If the URL has a question mark then it's simplest to just However, from what you've said, and reviewing the code, I've realized that CI_URI could simply be modified. [/quote] Nice catch on the uri_protocol auto setting behavior so if you do two method overloads everything should be fine to work with the $_GET global as normal; MY_URI.php Code: class MY_URI extends CI_URI MY_Input.php Code: class MY_Input extends CI_Input Like Pygon's solution if the $_SERVER variables get freaky the url can break.
[eluser]Avatar[/eluser]
Thanks for the modified code. I've tried it and am still having to access this functionality with having index.php in the url. That's the only way it gives output of query_string for me and everything after the query string is gone. Can we get some cheese here? preferably without index.php ![]()
[eluser]xwero[/eluser]
with or without the index.php in the url it should work or else your server is removing the $_GET global values and you need to check your httpd.conf form apache or your .htaccess file
|
Welcome Guest, Not a member yet? Register Sign In |