404 Page Not Found Error In Codeigniter
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about
Codeigniter 404 Page Not Found The Page You Requested Was Not Found
Stack Overflow the company Business Learn more about hiring developers or posting ads with the page you requested was not found. codeigniter 3 us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a
Codeigniter Show Page Not Found
community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up CodeIgniter: 404 Page Not Found on Live Server up vote 15 down vote favorite 4 codeigniter 3 404 page not found the page you requested was not found I have been developing a small web application with CodeIgniter. After testing it out locally I went to put it on my web server to allow a couple other people test out some features. While navigating to the site I get: - 404 Page Not Found error page When viewing it in my local machine everything loads up and runs perfectly. This is what I uploaded to the public_html directory: codeigniter 404 error load view application directory system directory assets directory (my assets for the site) index.php All of those are in the public_html directory. Like I said, it does give me CodeIgniters 404 error page, so I do know it is at least seeing CodeIgniter. I also tried changing the $config['base_url'], in the config.php, to my URL. Same error when changing that or leaving it blank. I checked my routes, and all those seem correct. Everything also loads up just fine when navigating to it on my local machine. I also am not using a .htaccess file at this time Any suggestions on what I should try? Thanks a lot! php codeigniter share|improve this question edited Oct 5 '15 at 14:47 Hassaan 3,4643726 asked Feb 25 '15 at 0:46 twigman08 78116 you can find your answer from this link stackoverflow.com/questions/9315316/… and stackoverflow.com/questions/17630669/… –Maninderpreet Singh Feb 25 '15 at 5:14 add a comment| 10 Answers 10 active oldest votes up vote 40 down vote accepted You are using MVC with OOPS Concept. So there are some certain rules. 1) Your class name (ie: controller name) should be start with capital Letter. e.g.: your controller name is 'icecream'. that should be 'Icecream' In localhost it might not be compulsory, but in server it wil
Web Development Computer ProgrammingHow do I solve CodeIgniter's 404 not found error?I have to handle an already developed website in codeIgnitor. I have added a new page in the website through FTP in the
Codeigniter Return 404
application/view folder, but it shows 404 not found error. How can I solve 404 controller codeigniter it? Other pages in the same directory can be seen perfectly!UpdateCancelPromoted by ToptalSimplify the hunt for your next developer.Toptal matches companies
Codeigniter 404 Page Not Found On Server
like Airbnb, Udacity, and Thumbtack with the top 3% of developers.Learn More at Toptal.comAnswer Wiki11 Answers Christophe Sautot, Creator of Event Staff App (eventstaffapp.com)Written 46w agoOne other item to check: With the newer version http://stackoverflow.com/questions/28709185/codeigniter-404-page-not-found-on-live-server of CI, and depending on your server, check the case of your controller file.Notice that:class Welcome extends CI_Controller {uses a file name of Welcome.php (with a capital W)21.2k Views · View UpvotesRelated QuestionsMore Answers BelowCodeigniter NuSoap Error996 ViewsWhat is a way to solve the "page not found" error?2,245 ViewsHow do I solve this: ''PHP. move_uploaded_file() error - 404''?644 ViewsWhen I enter the url without www, I receive an https://www.quora.com/How-do-I-solve-CodeIgniters-404-not-found-error 404 not found error.How to rectify it?1,890 ViewsWhat is error 404?4,965 Views James Burgess, James Burgess is a technology writer and software developer @ ValueCoders.comWritten 53w agoI am using CodeIgniter for two applications (a public and an admin app). The important elements of the document structure are:config.php to$config['uri_protocol'] = "REQUEST_URI";The /admin/.htaccess file looks like this:DirectoryIndex index.phpRewriteEngine onRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ ./index.php/$1 [L,QSA]everything worked.JamesSoftware Developer at Valuecoders17k Views · View Upvotes Kumar Navneet, web developerWritten 53w agoThat error can happen for many reason. here is some1.make sure you have main.php under controllers folder and inside main.php you should have a class Main which extends CI_Controller like thisclass Main extends CI_Controller2.make sure your .htaccess working.If your previous step is ok then try to hit this linkyour_site_url/index.php/main/cek_login//make sure cek_login function exists inside the controllerIf this link works you may have .htaccess problem3.your cpanel error tells that your .htaccess not working.check your server if it has main .htaccess which is redirecting your site if file not found.If so then your sub .htaccess will not work.I think this is the main reason that produce your error.keep asking15.5k Views · View Upvotes Elizabeth AndersonWritten 51w agofirst of all check if your server is running PHP usin
start getting this error: "404 Page Not FoundThe page you requested was not found."I have https://www.sitepoint.com/community/t/404-page-not-found-the-page-you-requested-was-not-found-codeigniter-project/223800 tried several method to resolve it but still getting the same error message. bellow are my files. Below is my config.php file showing the base url of my http://jeromejaglale.com/doc/php/codeigniter_404 application: $config['base_url'] = 'http://www.nicebis.com/'; This section contains the .htaccess File: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] Options -Indexes This section not found shows my database.php file $active_group = 'default'; $active_record = TRUE; $db['default']['hostname'] = 'localhost'; $db['default']['username'] = 'username'; $db['default']['password'] = 'password'; $db['default']['database'] = 'databasename'; $db['default']['dbdriver'] = 'mysql'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ''; $db['default']['char_set'] = 'utf8'; $db['default']['dbcollat'] = 'utf8_general_ci'; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = TRUE; $db['default']['stricton'] = FALSE; My rout.php page not found file is below: $route['default_controller'] = "account/login"; $route['404_override'] = ''; Please what is it that i'm not doing right? I need your help Thanks Ebere WebMachine 2016-05-12 15:17:42 UTC #2 I had exactly the same problem a week or so ago - turns out it was my .htaccess file: see https://www.sitepoint.com/community/t/codeigniter-3-and-cgi-fastcgi-solved/223069. John_Betong 2016-05-12 15:35:09 UTC #3 globalice: nicebis.com If @WebMachine's post did not work, try. Without .htaccess file Check the logs Set php error_reporting(-1); and ini_set('display errors', true); Set ./configure/configure.php threshold to 4 Check log Create temporary index.html and make sure that works globalice 2016-05-12 15:41:19 UTC #4 @John_Betong , this application was hosted with a hosting company and i dont have access to Set ./configure/configure.php John_Betong 2016-05-12 15:43:43 UTC #5 globalice: @John_Betong , this application was hosted with a hosting company and i dont have access to Set ./configure/configure.php CodeIgniter has a configure.php file in their configure directory that you have already modified to set the base_url(); Edit:Add echo __FILE__; die; to the second line of inde
class Error extends Controller { function error_404() { $this->output->set_status_header('404'); echo "404 - not found"; } } Add MY_Router.php system/application/libraries/MY_Router.php error_404(); function _validate_request($segments) { // Does the requested controller exist in the root folder? if (file_exists(APPPATH.'controllers/'.$segments[0].EXT)) { return $segments; } // Is the controller in a sub-folder? if (is_dir(APPPATH.'controllers/'.$segments[0])) { // Set the directory and remove it from the segment array $this->set_directory($segments[0]); $segments = array_slice($segments, 1); if (count($segments) > 0) { // Does the requested controller exist in the sub-folder? if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].EXT)) { return $this->error_404(); } } else { $this->set_class($this->default_controller); $this->set_method('index'); // Does the default controller exist in the sub-folder? if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.EXT)) { $this->directory = ''; return array(); } } return $segments; } // Can't find the requested controller... return $this->error_404(); } function error_404() { $this->directory = ""; $segments = array(); $segments[] = $this->error_controller; $segments[] = $this->error_method_404; return $segments; } function fetch_class() { // if method doesn't exist in class, change // class to error and method to error_404 $this->check_method(); return $this->class; } function check_method() { $ignore_remap = true; $class = $this->class; if (class_exists($class)) { // methods for this class $class_