Welcome Guest, Not a member yet? Register   Sign In
after installation still can't see index.php
#1

[eluser]spherop[/eluser]
I have apache/php 5 combo. just installed codeigniter by moving framework to folder inside my web directory "codeigniter".

in config.php:

$config['base_url'] = "http://localhost/codeigniter/";
$config['index_page'] = "";

so when i try to load:
http://localhost/codeigniter/index.php
i get 404 error.

but when i load:
http://localhost/codeigniter/index.php/welcome

it works...

is something wrong in my configuration?
#2

[eluser]mrahman[/eluser]
the 404 message you see is because no default controller is set in routes.php file.
change $route['default_controller'] = "your default control"
#3

[eluser]esra[/eluser]
What code is in your .htaccess file? With no .htaccess file present, CI should load welcome with http://localhost/codeigniter/ if index_page = index.php. If index_page is blank, you need to use an .htaccess file.

My .htaccess is below and you might want to try it and some of the other solutions posted on the forums until you get it to work correctly.

Code:
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
#4

[eluser]spherop[/eluser]
[quote author="mrahman" date="1194127213"]the 404 message you see is because no default controller is set in routes.php file.
change $route['default_controller'] = "your default control"[/quote]

my default controller set is "welcome"...

fresh install of codeigniter.
#5

[eluser]netmastan[/eluser]
I'm getting the same problem.
There are no .htaccess file with the distributed package.
According to installation guide i should change only base url if i don't use database.
Quote:CodeIgniter is installed in four steps:
1. Unzip the package.
2. Upload the CodeIgniter folders and files to your server. Normally the index.php file will be at your root.
3. Open the application/config/config.php file with a text editor and set your base URL.
4. If you intend to use a database, open the application/config/database.php file with a text editor and set your database settings.
#6

[eluser]netmastan[/eluser]
Ok. I got it work. All i had to do is change AUTO to PATH_INFO in config.php
Code:
$config['uri_protocol']    = "PATH_INFO";

Quote:If you find that no matter what you put in your URL only your default page is loading, it might be that your server does not support the PATH_INFO variable needed to serve search-engine friendly URLs. As a first step, open your application/config/config.php file and look for the URI Protocol information. It will recommend that you try a couple alternate settings. If it still doesn't work after you've tried this you'll need to force Code Igniter to add a question mark to your URLs. To do this open your application/config/config.php file and change this:




Theme © iAndrew 2016 - Forum software by © MyBB