无法使用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]