Welcome Guest, Not a member yet? Register   Sign In
New to CodeIgniter... got a simple question


I saw the video tutorial about how to use this PHP Framework and I instantly fell in love with this script. I wanted to start using it straight away, so i downloaded it and placed it in my web server on Windows OS, running XAMPP Suite.

When i entered this in my browser:


I saw the welcome message. According to the tutorial, If i typed this into the browser:


I should see the same welcome page right? Well, on my web server, it is giving me 404 file/folder not found error.

Why isn't it working? Im new to CI, so i would much appreciate it if someone would help me get this working. Thanks.

Im guessing you might not have index.php turned off aswell as using Apache.

Try http://localhost/myApp/index.php/welcome

Oh god, it works. Thanks allot for that, but im concerned about having to put index.php then the view file name.

What do u mean by this?

Quote:Im guessing you might not have index.php turned off aswell as using Apache.

OK read through http://ellislab.com/codeigniter/user-gui.../urls.html, it tells you how you can strip index.php with a codeigniter config setting and some apache.

Oh okay. Well, i put a .htaccess with the following in code in it:

Quote:RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

And the i visited the browser like this: http://localhost/myApp/welcome

I got a "Server error!", error code 500 =/

Make sure in config.php you also do $config['index_page'] = ""; so it knows not to use index.php

I tried that, and no it didnt help Sad

Hey, try taking the forward-slash off the front of the last line in your .htaccess
eg: RewriteRule ^(.*)$ index.php/$1 [L]

It's trying to redirect to index.php in your root directory, but you have everything up one level in your MyApp dir.

Hopefully that will fix it Smile

Theme © iAndrew 2016 - Forum software by © MyBB