简体   繁体   中英

CodeIgniter 2.0 always redirected to welcome controller when set uri_protocol as AUTO

I just set up a development environment using CodeIgniter 2.0 and in config I leave the uri_protocol as

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

But my problem is all Controller/Action request send to the welcome controller. I checked this again by changing the uri_protocol to QUERY_STRING and it works fine for me. Why is this always redirected to welcome controller when using uri_protocol as AUTO ?

'AUTO' option actualy tries the possible option in a certain order which may not be suitable to system you are working on. You should test each of the possible options to see which one suits your system. It happened to me on a customer server (windows server i guess).

Possible options listed as comment above the option line.

'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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM