我正在使用雪豹,我有我的本地环境,我正试图摆脱 url 中的 index.php ......这就是我所拥有的
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
我的配置文件有这个
$config['index_page'] = "";
但是当我访问没有 index.php 的页面时它不起作用
这行得通
http://localhost/ci_example/index.php/site
这不是
http://localhost/ci_example/site
我试图遵循这个
也许我需要对我的本地 conf 文件做一些事情......但我真的不知道是什么,我不知道如何重新启动 apache 命令行......任何想法