Can not rewrite to file using .htaccess in CodeIgniter?
My structure like this :
- application
- controllers
- log
- login
- mysite
I want to redirect http://mysite/index.php/log/login
=> mysite/login.html
I turned on Rewrite Mode; In my .htaccess:
Options +FollowSymLinks All -Indexes
RewriteEngine On
RewriteRule ^login.html$ ./index.php/log/login
but I met 404 error. I tested by make one file test.php
and place it 开发者_C百科in mysite
folder
=> It is OK!
Please help me config that URL.
Try this
Options -Indexes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ index.php/log/$1 [L]
精彩评论