Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.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
无法使用CodeIgniter中的.htaccess重写到文件?_.htaccess_Codeigniter - Fatal编程技术网

无法使用CodeIgniter中的.htaccess重写到文件?

无法使用CodeIgniter中的.htaccess重写到文件?,.htaccess,codeigniter,.htaccess,Codeigniter,我的结构是这样的: - application - controllers - log - login - mysite 我想重定向http://mysite/index.php/log/login =>mysite/login.html 我打开了重写模式;在my.htaccess中: Options +FollowSymLinks All -Indexes RewriteEngine On RewriteRule ^login.html$ ./index.php/log/lo

我的结构是这样的:

- application
  - controllers
  - log
    - login
- mysite
我想重定向http://mysite/index.php/log/login =>mysite/login.html

我打开了重写模式;在my.htaccess中:

Options +FollowSymLinks All -Indexes
RewriteEngine On
RewriteRule ^login.html$ ./index.php/log/login
但我遇到了404错误。我通过生成一个文件test.php并将其放在mysite文件夹中进行了测试 =>没关系

请帮助我配置该URL。

试试这个

Options -Indexes
RewriteEngine on  

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ index.php/log/$1 [L]