• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Following tutorial and getting a 404 when accessing controllers

I'm following the tutorial and got as far as the controllers section.  Accessing http://localhost/codeIgniter/index.php/blog works but accessing http://localhost/codeIgniter/index.php/blog/comments does not. It throws a 404 error.

I've got base_url set as so: $config['base_url'] = 'http://localhost/codeIgniter';

I've tried adding this to my .htaccess in the /www/codeIgniter directory (as well as a couple variations I found while googling):

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

Mod rewrite is installed.

I've got AllowOverride All in my httpd.conf file.

I also set the index_page as blank.

I've also just tried not rewriting anything.

I'm running on WAMP on Windows 7 with Apache 2.435, and have tried PHP 5.6 and 7.

Have been at this for a couple hours now, please help?


Can you enable the debug log in application\config\config.php.
And you will find them in application\logs

Can you print screen the 404 message? So we can see if it's Codeigniter or your webbserver that gives you that message.

Try adding a trailing slash to the base_url string.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.