在项目中,我在config.php中设置以下代码:
$config['index_page'] ='index.php?';
在.htaccess中设置以下代码:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
目录结构是:
site_name
----ci_folder
-------application
---------- controller
---------- view
---------- model
--------system
-------.htaccess