6

I set my baseurl to:

http://localhost/codeigniter/

in the application/config/config.php file as asked by the installation instructions.

I was following this tutorial. However, when I type in the url: http://localhost/codeigniter/index.php/pages/view , I get the the following error:

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

localhost 7/27/2012 11:14:39 PM Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0

I found the following contents in .htaccess file in the path of E:\WEB D\xampp\htdocs\CodeIgniter_2.1.2\application:

Deny from all

I am totally new to the CodeIgniter framework. Can someone help me out?

8
  • Please include the entire error message in your question. It shouldn't just say "Object Not Found." Commented Jul 27, 2012 at 17:50
  • Are the files and classes all named properly? Commented Jul 27, 2012 at 17:51
  • Is there a .htaccess file somewhere? If so can you post it? Commented Jul 27, 2012 at 17:52
  • i named all the files and classes as mentioned in the tutorial. Commented Jul 27, 2012 at 17:52
  • yeah .. .htacess file was there .. I posted it in the edited question. Commented Jul 27, 2012 at 17:54

3 Answers 3

6

Ok, well for anyone wondering the final solution to this was that the directories were not properly named. When creating a local server it is important to put the contents of the files in the correct folder.

So if you have http://localhost/codeigniter then the directory should be setup as \path\to\webdirectory\root\codeigniter or in this case: E:\WEBD\xampp\htdocs\codeigniter

Sign up to request clarification or add additional context in comments.

Comments

4

try edit your .htaccess file became like this below, and put .htaccess file in your root application folder

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

1 Comment

godlike answer to me :D
0

Make sure that your php errors are visible.

I had this issue as well when trying to set the base_url for Code Igniter when I was working off localhost. I had a look in the htaccess file, checked that mod_rewrite was switched on, tried altering the base_url but all failed.

The solution was to make sure that the environment was set to development in the main index.php file and to ensure that $config['log_threshold'] = 4; is set in config.php.

After that my php errors showed up. I'd forgotten to switch the development environment for the new website build.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.