First of all, i have tried the suggestion specified in here:
OK, You mentioned lot of Stack links which related to your question.
Change this settings
$config['base_url'] = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
and add this in .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Note: Some time in localhost
index.php
will not removed.
and to include your css/js/images
CSS:
<link rel="stylesheet" href="<?php echo base_url()?>assets/styles/material-design-icons.css" type="text/css" />
JS :<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/in/easing.js"></script>
Img:<img src="<?php echo base_url()?>assets/image/logo.jpg" alt=""/>
So file structure would be
- application
- assets
- style
- material-design-icons.css
- font.css
- app.css
- js
- easing.js
- image
- logo.jpg
- index.php
- .htaccess(Post in my code)
EDIT 01
In config/routes.php
$route['default_controller'] = "";//give default controller name
$route['404_override'] = '';