codeigniter, 404 not found error |
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.
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/ |
Welcome Guest, Not a member yet? Register Sign In |