When I go here: localhost/codeigniter/index.php/gallery the file is there
but when I go here: localhost/codeigniter/gallery
I get this:
Not Found The requested URL /codeigniter/gallery was not found on this server.
However when I go here: localhost/codeigniter/ everything is good. It’s the same as localhost/codeigniter/index.php/
I put this in my .htacess file in the system folder:
RewriteEngine on
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
I also made sure that in the config.php file that
$config[‘base_url’] = ‘’;
$config[‘index_page’] = ‘’;
You need
mod_rewriteenabled. The reasonlocalhost/codeigniterworks is because it defaults to the index.php file. However, past that, the server looks for a directory. You need Apache to parse that differently.Look here:
Remove CodeIgniter index.php