【发布时间】:2012-04-13 15:15:54
【问题描述】:
我按照 htaccess 中所说的做了:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
我把上面的,这样我就能做到这一点:
http://localhost/Speakom2/Home/index
代替:
http://localhost/Speakom2/index.php/Home/index
但它不起作用...我收到 404 错误..如何解决这个问题才能正常工作?!?
控制器:
class Home extends CI_Controller {
public function Index()
{
$this->load->view('welcome_message');
}
}
htaccess:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
【问题讨论】:
标签: php codeigniter