-
Notifications
You must be signed in to change notification settings - Fork 26
Server URL problems
As explained in the Troubleshooting section in the User Guide, CI requires the PATH INFO server variable in order for it's segment based system to work ([url=http://www.codeigniter.com/user_guide/installation/troubleshooting.html]http://www.codeigniter.com/user_guide/installation/troubleshooting.html[/url]) The User Guide suggests a number of fixes, and personally I found the only option was to use to append the '?' to my index_page. I wasn't satisfied with this so I did some further investigation and it turns out that my host did support PATH INFO however it was being rejected - the solution - set the AcceptPathInfo directive to 'On' in a htaccess file:
<FilesMatch "^index.php$"> SetHandler application/x-httpd-php #always a good idea to confirm type AcceptPathInfo On
// index.php <?php echo $_SERVER [ 'PATH_INFO' ] ; die(); //outputs '/my/path/info' ?>
You see, some servers (such as the one i am hosted on) have this set to 'default' which often rejects path info....
NB: This can be added to the same htaccess file as the mod_rewrite used to remove the index.php file