我已完成所有工作,但仍无法正常工作。我不知道我怎么了。我已经在apache2服务器上启用了mod_rewrite
。在配置中,$config['index_page'] = ''
;和$config['uri_protocol'] = 'REQUEST_URI';
这是我的基本网址$config['base_url'] = 'http://localhost/RB';
我的codeignitor根.htaccess文件包含,
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
这是其官方website上给出的代码。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]