set default uri_protocol to PATH_INFO instead of AUTO - 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: set default uri_protocol to PATH_INFO instead of AUTO (/showthread.php?tid=16624) |
set default uri_protocol to PATH_INFO instead of AUTO - El Forum - 03-12-2009 [eluser]xwero[/eluser] The trigger for this change is the continuously asked question : how to use the GET global in CI. I think not clearing the GET global is only part of the solution because the AUTO setting has some odd behavior. Code: // If the URL has a question mark then it's simplest to just I understand the framework should work out of the box but is it so hard to set an extra value to get the framework running. I think PATH_INFO is supported by most webservers nowadays. What are your thoughts? set default uri_protocol to PATH_INFO instead of AUTO - El Forum - 11-25-2009 [eluser]ThatBlokeRob[/eluser] Hey, N00b question. Where should I copy / paste this code in order for it to work? Many Thanks, Rob set default uri_protocol to PATH_INFO instead of AUTO - El Forum - 11-25-2009 [eluser]BrianDHall[/eluser] Have you tried enabling GET and setting the uri protocol to PATH_INFO in config.php? Works like a charm for me, though I have heard some people say it isn't working right for them. set default uri_protocol to PATH_INFO instead of AUTO - El Forum - 11-25-2009 [eluser]ThatBlokeRob[/eluser] Hey Brian, How do I enable GET? I set uri protocol PATH_INFO and that stopped getting to the error page, now just the home page. How do I get it to view the page the browsers on? Robin set default uri_protocol to PATH_INFO instead of AUTO - El Forum - 11-25-2009 [eluser]BrianDHall[/eluser] [quote author="ThatBlokeRob" date="1259188547"]Hey Brian, How do I enable GET? I set uri protocol PATH_INFO and that stopped getting to the error page, now just the home page. How do I get it to view the page the browsers on? Robin[/quote] In config.php: Code: /* Now you could do ?c=controller&m=function and basically get rid of segment routing, but I like having both together, thus the use of PATH_INFO setting in config.php. So now with the hybrid if it works properly you should be able to have website.com/controller/function?search=search+terms And CI will handle everything as if there was no query string - only $GET will still be available everywhere, so you can access it directly and do whatever you like. Oh you may have to add some extra stuff to permitted_uri_chars so CI won't complain about the + sign and such. set default uri_protocol to PATH_INFO instead of AUTO - El Forum - 11-26-2009 [eluser]ThatBlokeRob[/eluser] Hey Brian, Thank you for your help - that's cracked it!! Robin set default uri_protocol to PATH_INFO instead of AUTO - El Forum - 01-26-2011 [eluser]dippy[/eluser] How do i make this work with the index.php not in the url? my .htaccess file: Code: <IfModule mod_rewrite.c> every time it shows the home page. set default uri_protocol to PATH_INFO instead of AUTO - El Forum - 02-03-2011 [eluser]dippy[/eluser] any help here? i cant figure it out... it keeps bringing me back to the homepage even after i set the settings in config.php .... is it my .htaccess file? set default uri_protocol to PATH_INFO instead of AUTO - El Forum - 02-05-2011 [eluser]dippy[/eluser] bump** |