File Not found error

#1
[eluser]dannythebestguy[/eluser]
I uploaded codeIgnitor directory which I was working on locally to the main server. After changing the configuration in the config file it does not work. On the http://serverIP/codeignitor/ I get the welcome page. But after that it says file not found. Like http://serverIP/codeignitor/controllerfile_name/function it says file not found.

Thanx in advance

#2
[eluser]Pascal Kriete[/eluser]
Did you upload/update the .htaccess file as well?

#3
[eluser]dannythebestguy[/eluser]
I did not get any .htaccess file with the CodeIgniter download. Which directory can I find that..

#4
[eluser]Colin Williams[/eluser]
Think about it: Without mod_rewrite rules, Apache is going to look for a folder named 'controllerfile_name' and 'function'

An .htaccess file with mod_rewrite rules typically sets it up so that apache loads the index.php front controller if it can't find the URL itself. With no mod_rewrite rules, you need to first send the request through index.php manually, just as the User Guide explains: http://serverIP/codeignitor/index.php/controllerfile_name/function

See:

http://codeigniter.com/wiki/mod_rewrite/
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
http://www.addedbytes.com/download/mod_r...et-v2/pdf/

#5
[eluser]dannythebestguy[/eluser]
What do I do if mod_rewrite is disabled in the Server. Makes me nervous now...

#6
[eluser]Colin Williams[/eluser]
Then you need the index.php in there.

Quote:By default, the index.php file will be included in your URLs:
example.com/index.php/news/article/my_article

#7
[eluser]dannythebestguy[/eluser]
I could access the files by

http://serverIP/codeignitor/index.php?controllerfile_name/function

But the same use of index.php? does not work in my Local server. A bit confused though.. but as long as it works it shud be fine Wink

#8
[eluser]Colin Williams[/eluser]
PATH_INFO is a server variable that is defined by a path that continues from the .php extension (and I'm pretty sure it must come before the query string). CI prefers to use this convention, but it's not impossible to use another. What you have written there is an odd-looking query string.

#9
[eluser]dannythebestguy[/eluser]
This is what I have from Manual->Troubleshooting
If it still doesn't work after you've tried this you'll need to force CodeIgniter to add a question mark to your URLs. To do this open your application/config/config.php file and change this:
And it says to change it to index.php?

I do not know how but index.php?controller/function works fine in the Apache/2.0.46 (Red Hat) Server. Big Grin Something to ponder about...

#10
[eluser]dannythebestguy[/eluser]
I got it... The $config['uri_protocol']in the config file was on Auto.
The PATH_INFO on the server is disabled. So it took the second parameter QUERY_STRING

So ? works. I changed the uri_protocol to QUERY_STRING and now I can run by index.php?controller/function

Thnx


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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