我使用codeigniter mvc。我想重写我的路线目前情况是这样的
http://localhost/abc/index.php/blog
我想要它像
http://localhost/abc/blog
我在我的htaccess文件中使用
RewriteEngine On
RewriteBase /abc/
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
当我改变我得到服务器500错误
。haccess示例可在http://ellislab.com/codeigniter/user-guide/general/urls.html上获得。删除应用程序/config/config.php中的index.php -更改为:
$config['index_page'] = '';
RewriteEngine On
RewriteBase /abc/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]