codeigniter 3 - remove index.php : error 404 on linux but work fine on windows
Linux is case sensitive. Keep in mind in which case you wrote the directory and file name. You should write file or directory name in any file exactly same what file or directory belongs.
Please check the file/directory of user_authentification
. Moreover, the first letter of controller/model should be caps (codeigniter requirements). Please check did you write controller/model
name correctly.
Update
Put the following snippets on .htaccess
file:
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA]</IfModule>
Create .htaccess file in project root directory if other .htaccess file is not already created.
copy paste below codes into it .
<IfModule mod_rewrite.c>RewriteEngine onRewriteBase /projectnameRewriteCond $1 !^(index\.php|resources|robots\.txt)RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php/$1 [L,QSA]</IfModule>
You can try this link http://addictors.in/remove-index-php-from-url-in-codeigniter/
don't forget to restart your server
Hope it helps.
The administrator has found the error. There was an error in virtual host.
The .htaccess file was never executed.
Thank you all for your help.