我当前的url是http://localhost/ci/也在config.php 下设置
但是如何在不指定index.php 的情况下打开视图中的其他页面
http://localhost/ci/Pages/view/login,但不是这样http://localhost/ci/index.php/Pages/view/login
您应该看看这个
http://www.freewebmasterhelp.com/tutorials/htaccess/
你可以用.htaccess
文件做很多事情试着把它放在你的.htaccess
文件中
RewriteEngine on
RewriteCond $1 ^(Pages|view|login|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
使用application/config/routes.php文件。
添加URL路由定义非常简单。
有关详细信息,请参阅此链接:http://codeigniter.com/user_guide/general/routing.html