codeigniter, 404 not found error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: codeigniter, 404 not found error (/showthread.php?tid=62327) |
codeigniter, 404 not found error - tharindu12 - 07-02-2015 I have a web site and I have installed CodeIgniter 2 Site under sub folder (`test`) Users can access the site by using following link: http://www.example.com/test/ When user is going to access (`test`) site using above link URL redirected to following link and following error will displayed. http://www.example.com/test/login > Not Found > > The requested URL /test/login was not found on this server. Then I add `index.php` to the above URL, login page displayed. http://www.example.com/test/index.php/login When I submit my username and password again URL redirected to, without logged on. http://www.example.com/test/login And again, not found. `.htaccess`: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> `config.php`: $config['base_url'] = ''; $config['index_page'] = ''; $config['uri_protocol'] = "AUTO" ; I have tried `$config['base_url'] = "http://www.example.com/test"` - still not working. RE: codeigniter, 404 not found error - CroNiX - 07-03-2015 Try changing to: RewriteRule ^(.*)$ index.php?/$1 [L] and $config['base_url'] = "http://www.example.com/test/ [add trailing slash as the notes state] If that doesn't work, try adding to your htaccess before rewrite rules: RewriteBase /test/ |