I am using Codeigniter in Local WAMP. Here code is working fine. But i upload in Cpanel ( inside of example.com, folder name call \'mysite
\'). Ther
try this
$config['uri_protocol'] = 'PATH_INFO';
$config['enable_query_strings'] = FALSE;
Httaccess
<IfModule mod_rewrite.c>
RewriteEngine On
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [NC]
</IfModule>
If you plan to use subfolder on server do the same on local WAMP. This way you can test it before you send it on server.
I was using CI long time ago but I think you have to add mysite/
in some config file.
See: Installing a CodeIgniter application in a subfolder
I solved the same issue by changing the controller file name to start with a capital letter.
Just like the default 'Welcome' controller downloaded.
Remove
$route['user/(:any)'] = 'user/index';
in your routes.php file. user/signin matches the above condition, that is why CI route the request to user/index instead of your "User" controller "signin" function.
What are you trying to achieve with that route configuration?
.htaccess Code
Restore the default config to config.php, Hope this helps you.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
I used following .htaccess file and it works for me with cpanel.
# index file can be index.php, home.php, default.php etc.
DirectoryIndex index.php
# Rewrite engine
RewriteEngine On
# condition with escaping special chars
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]