404 error when i hosted my site in server
Did you update your HTACCESS to forward request to the index.php file? You cannot just set $index_page to ''. If www.subdomain.example.com/index.php/Welcome/login appears you might just need to add this to your HTACCESS file:
RewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]