在 controllers 添加子文件夹 index.php没隐藏掉
/index.php/admin/welcome 必须这样想写 才可以怎么把index.php 全部去掉啊http://codeigniter.org.cn/user_guide/general/urls.html 用户手册里有.. 这个可以通过修改 .htaccess 文件实现。 修改.htaccess文件,例如手册里写的:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d //此处有大坑。加上这两句可保证一般css、js文件正常加载。(注意删掉这句注释哦)
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 开启重定向 都按手册和网上的做了,控制器目录下也是分了admin和index两个目录。路径已经成了http://localhost/app/admin/index,但是会提示404错误。
页:
[1]