Edit Config.php file:
look for the "application/config/config.php" file, change the value of $config['index_page'] from "index.php" to "".
From
$config['index_page'] = "index.php";To
$config['index_page'] = "";
And Then change the value of $config['uri_protocol'] from "AUTO" to "REQUEST_URI":
.htaccess
Create an empty files named ".htaccess" at your Codeigniter project root, and paste these code inside the file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Reference:
https://ellislab.com/codeigniter/user-guide/general/urls.html
http://www.formget.com/codeigniter-htaccess-remove-index-php/
No comments :
Post a Comment