Welcome Guest, Not a member yet? Register   Sign In
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:


When user is going to access (`test`) site using above link URL redirected to following link and following error will displayed.


> 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.


When I submit my username and password again URL redirected to, without logged on.


And again, not found.


   <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^(.*)$ index.php/$1 [L]


   $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]

$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/

Theme © iAndrew 2016 - Forum software by © MyBB