How can I remove 'index.php' from urls, if I have some controllers in the controllers folder and one in subfolder? For example my frontend url looks like this : domain.com/site/contact.html I would like my backend url look like this: domain.com/system/settings/profile.html, where system is not a controller, only a subfolder in the controllers folder. When I type domain.com/index.php/system/settings/profile.html, everything works fine, it just does not look right. Here's what's in my routes.php file:
$route['default_controller'] = "site";
$route['system'] = "system/login";
$route['404_override'] = 'errors/error_404';
Here's what's in my .htaccess file:
RewriteEngine on
RewriteCond $1 !^(index\.php|img|css|public|tmp|download|javascript|rte|document|xajax_js|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
Thanks.
You can try set
RewriteBase
likeRewriteBase /
orRewriteBase /site/