Codeigniter: how to remove index.php from URL?
问题 I've looked at many articles and tried different ways but it still doesn't work. Now my URLs look like mysite.com/index.php/[controller] . The goal is mysite.com/[controller] . In config.php : $config['index_page'] = ""; $config['uri_protocol'] = 'REQUEST_URI'; My .htaccess file contains RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] Also mod_rewrite is enabled