413938406 发表于 2013-1-6 11:02:02

在 controllers 添加子文件夹 index.php没隐藏掉

/index.php/admin/welcome 必须这样想写 才可以怎么把index.php 全部去掉啊

Rinsys\haibaoh 发表于 2013-1-6 11:27:30

http://codeigniter.org.cn/user_guide/general/urls.html   用户手册里有..

nekchen 发表于 2013-1-8 10:59:50

这个可以通过修改 .htaccess 文件实现。

aqxinzhuan 发表于 2014-8-11 17:32:06

修改.htaccess文件,例如手册里写的:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d      //此处有大坑。加上这两句可保证一般css、js文件正常加载。(注意删掉这句注释哦)

RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1

zjxhdlj 发表于 2014-8-11 18:23:30

开启重定向

shamoguhun 发表于 2014-12-10 22:57:19

都按手册和网上的做了,控制器目录下也是分了admin和index两个目录。路径已经成了http://localhost/app/admin/index,但是会提示404错误。
页: [1]
查看完整版本: 在 controllers 添加子文件夹 index.php没隐藏掉