![]() |
URL bug - A segment of '0' returns false? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: URL bug - A segment of '0' returns false? (/showthread.php?tid=58377) |
URL bug - A segment of '0' returns false? - El Forum - 06-07-2013 [eluser]Rokkitt[/eluser] Seriously. This is causing me all kind of headaches. Have the same code locally as I do on my server. Both are running PHP 5.4. config/routes.php Code: $route['default_controller'] = "frontend/run"; controllers/frontend.php > run() Code: public function run() Tests mysite.com/blah // Returns: string(4) "blah" mysite.com/1 // Returns: string(1) "1" On my server.. broken.. mysite.com/0 // Returns: bool(false) Locally.. works.. mysite.com/0 // Returns: string(0) "0" Can anyone else recreate this? Any idea why this is happening? URL bug - A segment of '0' returns false? - El Forum - 06-07-2013 [eluser]Rokkitt[/eluser] Been plugging away at this for 2 hours.. surprising what posting can shake loose. Server required the following config setting. <code>$config['uri_protocol'] = 'REQUEST_URI';</code> I don't know if this would be classed as a CI error. Rather annoying though. Use a URI of 0 to check that the uri_protocol is properly configured I guess. |