CodeIgniter Forums
uri_protocole - 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: uri_protocole (/showthread.php?tid=31686)

Pages: 1 2


uri_protocole - El Forum - 06-28-2010

[eluser]hamzakhan[/eluser]
what is a purpose of both and other possible
values of uri_portocole?

$config['uri_protocol'] = "PATH_INFO";
$config['uri_protocol'] = "AUTO";


uri_protocole - El Forum - 06-28-2010

[eluser]steelaz[/eluser]
By setting $config['uri_protocol'] you tell CodeIgniter how to determine what controller and method to call (based on your URL). You can leave it as "AUTO", but if it doesn't work (i.e. CodeIgniter selects wrong controller) you can try different options.


uri_protocole - El Forum - 06-29-2010

[eluser]hamzakhan[/eluser]
i haven't seen different options for config[‘uri_protocol’].
i wan to know about remaining options.because last night
which i uploaded my project AUTO , and few others was not working.


uri_protocole - El Forum - 06-29-2010

[eluser]n0xie[/eluser]
It's in the file...?
Code:
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'            Default - auto detects
| 'PATH_INFO'        Uses the PATH_INFO
| 'QUERY_STRING'    Uses the QUERY_STRING
| 'REQUEST_URI'        Uses the REQUEST_URI
| 'ORIG_PATH_INFO'    Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol']    = "PATH_INFO";



uri_protocole - El Forum - 06-29-2010

[eluser]hamzakhan[/eluser]
i haven't noticed this i was looking in user_guide.
few many are missing and no explanation are there for it.


uri_protocole - El Forum - 06-29-2010

[eluser]hamzakhan[/eluser]
$config['uri_protocol'] = "PATH_INFO"; workging locallly fine but not working on live server
live server i need to change this protocole to $config['uri_protocol'] = "ORIG_PATH_INFO";
please tell me where is the problem


uri_protocole - El Forum - 06-29-2010

[eluser]steelaz[/eluser]
There is no problem, your local and live server configurations are different.


uri_protocole - El Forum - 06-29-2010

[eluser]hamzakhan[/eluser]
i always need to change the uri protocole when get live and local.
tell me better solution


uri_protocole - El Forum - 06-29-2010

[eluser]Clooner[/eluser]
[quote author="hamzakhan" date="1277836931"]i always need to change the uri protocole when get live and local.
tell me better solution[/quote] A better solution is to better configure your live development server so it is the same as your live location. That's the problem not CI


uri_protocole - El Forum - 06-29-2010

[eluser]steelaz[/eluser]
You can always use some kind of detection to switch settings between local and live environment. Here's an example of what I'm using right now:

Code:
$config['uri_protocol'] = ($_SERVER['SERVER_ADDR'] == '127.0.0.1') ? 'AUTO' : 'ORIG_PATH_INFO';