ci隐藏index.php的方法:首先打开【rewrite_module】,并修改AllowOverride none为AllowOverride All;然后在CI的目录下面创建【.htaccess】文件并添加相关内容;最后相关内容即可。

ci隐藏index.php的方法:
1.需要apache打开rewrite_module,然后修改httpd.conf的AllowOverride none为AllowOverride All(里面,不同的环境目录不同)
2.在CI的目录下面创建.htaccess文件,加入如下内容:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]3.修改config.php的内容:
立即学习“PHP免费学习笔记(深入)”;
$config['index_page'] = 'index.php';
替换为
$config['index_page'] = '';
相关学习推荐:php编程(视频)
以上就是ci如何隐藏index.php的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号