|
本帖最后由 JoeV587 于 2016-6-6 19:13 编辑
在网上查询了好多方法,都不能用,哪位大神弄过,帮忙告诉下,
环境windows,apache
采用什么方法修改呢。这是网上的方法
————————————————————————————————————————
然后,在 CI 根目录下新建立一个配置文件,命名为: .htaccess
在里面这样写:- RewriteEngine on
- RewriteCond $1 !^(index\.php|images|robots\.txt)
- RewriteRule ^(.*)$ /index.php/$1 [L]
就可以去掉 index.php 了。要注意 /index.php/$1 要根据你目录(Web 目录,比如 http://www.domain.com/index.php)的实际情况来定,比如网站根目录是 /ci/index.php 则要写成 /ci/index.php/$1
- RewriteCond $1 !^(index\.php|images|robots\.txt)
- $config['index_page' = "index.php";
- 改为$config['index_page' = "";
————————————————————————————————————————
这样修改完以后还是不行,目录会出现
http://localhost/srgk//home/znst_index
必须加一个问号才行例如:
http://localhost/srgk/?/home/znst_index 这样才能访问通
谁知道,帮忙告诉下,多谢了
|
|