CodeIgniter 2 and segment-based URLs with query strings |
[eluser]Prophet[/eluser]
Hi all. I was a little frustrated to find that the old Code: $config['uri_protocol'] = "PATH_INFO"; ![]() Using this configuration in CI2 will give you URLs like www.example.com/?/ and www.example.com/?controller/method which I don't think is ideal. I came up with a really simple fix. I don't know if it's the right thing to do, but it makes sense to me. In system/core/Config.php, change line 221 from: Code: if ($this->item('enable_query_strings') == FALSE) Code: if ($this->item('enable_query_strings') == FALSE OR $this->item('uri_protocol') == 'PATH_INFO') I recommend creating application/core/MY_Config.php and overriding the site_url() method to avoid overwriting your changes when you pull the latest CI2 source in. |
Messages In This Thread |
CodeIgniter 2 and segment-based URLs with query strings - by El Forum - 11-08-2010, 02:54 AM
CodeIgniter 2 and segment-based URLs with query strings - by El Forum - 11-08-2010, 03:15 AM
CodeIgniter 2 and segment-based URLs with query strings - by El Forum - 11-08-2010, 03:23 AM
CodeIgniter 2 and segment-based URLs with query strings - by El Forum - 11-08-2010, 07:18 AM
|