Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Codeigniter URL重写无法使用找不到的对象错误_Php_.htaccess_Codeigniter_Codeigniter Url - Fatal编程技术网

Php Codeigniter URL重写无法使用找不到的对象错误

Php Codeigniter URL重写无法使用找不到的对象错误,php,.htaccess,codeigniter,codeigniter-url,Php,.htaccess,Codeigniter,Codeigniter Url,我是codeigniter的新手。我尝试在本地服务器中使用url重写来隐藏index.php文件夹,但当我尝试访问任何控制器时,它会显示object not found错误。 或者示例users/login不工作,而index.php/users/login正在处理如何修复它 详细信息为 应用程序目录->f:xampp/htdocs/testapp/application/controllers/users 在config.php->$config['index_page']='index.ph

我是codeigniter的新手。我尝试在本地服务器中使用url重写来隐藏index.php文件夹,但当我尝试访问任何控制器时,它会显示object not found错误。 或者示例users/login不工作,而index.php/users/login正在处理如何修复它

详细信息为 应用程序目录->f:xampp/htdocs/testapp/application/controllers/users

在config.php->
$config['index_page']='index.php'中

在路由中->
$route['default\u controller']=“users”

.查阅规则-

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
Deny from all
工作网址-

localhost/bluechip/index.php/users/login

不工作-

localhost/bluechip/users/login

配置使用中

$config['index_page'] = '';
并使用以下。htaccess-

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

对不起,我是一名新会员,因此stack exchange要求15个声誉提升投票