It works fine on localhost.
when I upload onto subdomain on my cpanel.
My .htaccess file
# <IfModule mod_rewrite.c>
# SetEnv HTTP_MOD_REWRITE On
# RewriteEngine On
# RewriteBase /
# </IfModule>
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule ^(.*)$ ./index.php/$1 [L]