[eluser]qpixo[/eluser]
Does anyone know how to remove 'index.php' ?
While clicking on menu options, I got that annoying error 404: The requested URL /index.php/site_controller/1 was not found on this server. I'm running in localhost, does .htaccess will work?
I have tried these methods but without success of course restart apache server:
In Config.php
Code:
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
My Menu View:
Code:
...
$url = "<ul><li><a href='site_controller/" . $item->cat_id . "'>" . strtoupper($item->name) . "</a></li></ul>";
My .htaccess:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
Options +FollowSymLinks
RewriteCond $1 !^(index\.php|css|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteCond %{REQUEST_URI} ^system.*
</IfModule>
Routes.php:
Code:
// Custom routes
$route['site_controller/(:num)'] = "site_controller/loadPage/$1";