Remove index.php from url in CodeIgniter 3
问题 I am doing a project in CodeIgniter 3. I need to remove index.php from url. For that help me to get .htaccess file for CodeIgniter 3 and also where to place this file. This is my baseurl http://cableandmedia.com/demo/ 回答1: Update your htaccess file with the below code RewriteEngine On RewriteBase /demo RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] and in config file, please change base url with below code:- $root = "http://".$