nginx下ci去掉“index.php”的方法:首先在根目錄下新增“.htaccess”文件;然后修改“nginx.conf”配置文件內(nèi)容為“ rewrite ^/(.*)$ /index.php/$1;”;最后保存修改即可。
推薦:《php視頻教程》
ci框架去除index.php(nginx)
在根目錄新增.htaccess文件
<ifmodule authz_core_module> require all denied</ifmodule><ifmodule !authz_core_module> deny from all</ifmodule>修改nginx.conf(如果有vhost.conf文件,則修改此文件)配置文件
location / { index index.html index.htm index.php; #autoindex on; if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1; }}