404 page not found: error while running localhost//ci/ in codeigniter 3/1/2 - codeigniter

I am a beginner in codeigniter 3.1.2.
While I am running localhost//ci it shows 404 page not found error. ci is my folder name.
What should I do?

May be you gets 404 error because of Controller.
Defining a Default Controller
CodeIgniter can be told to load a default controller when a URI is not present, as will be the case when only your site root URL is requested. To specify a default controller, open your application/config/routes.php file and set this variable:
$route['default_controller'] = 'blog';
Where ‘blog’ is the name of the controller class you want used. If you now load your main index.php file without specifying any URI segments you’ll see your “Hello World” message by default.
For more information, please refer to the “Reserved Routes” section of the URI Routing documentation.
or may be there .htaccess problem
check link for more https://www.sitepoint.com/community/t/404-page-not-found-the-page-you-requested-was-not-found-codeigniter-project/223800

Related

Helper file cant load in codeigniter subdomain

i already moved my project into subdomain on a live server, and i found this error
Unable to load the requested file: helpers/app_helper.php
seems like the helper file can't load in a controller.
and here is my base url config:
$config['base_url'] = 'http://log.mysite.co.id';
what i missed? is there any different configuration between main domain and subdomain setting?

Codeigniter display blank page and no errors

When I access my application, browser display blank page like this :
There is no error
My application using codeigniter
Any help much appreciated
Cheers
Probably your environment is not displaying errors. This can be because your php.ini configuration or because the definition of the constant ENVIRONMENT in spsubagent/index.php.
If your php.ini are configured correctly, so you 'ENVIROMENT' constant must be defined with 'development' value to display errors, because the 'production' value must hide errors.
Bad practice:
You can force the exibition of the error defining the error_reporting(E_ALL); in the construct of your controller.
Check your .htaccess file or replace your htaccess file with new htaccess file for codeigniter.

CodeIgniter url not working for new class

I uploaded CodeIgniter in my server, and the basic page works fine.
Then I added home.php file in application/controllers folder with class Hello and function one, and tried to open the link url/index.php/Hello/one but I get the codeIgniter error that the page isn't found. What can I be missing?
To fix your issue you should rename the Hello class to Home then go to URL/index.php/home/one
I recommend that you read up on the controller documentation:
http://ellislab.com/codeigniter/user-guide/general/controllers.html
A Controller is simply a class file that is named in a way that can be
associated with a URI.
Consider this URI: example.com/index.php/blog/
In the above example, CodeIgniter would attempt to find a controller
named blog.php and load it.
When a controller's name matches the first segment of a URI, it will
be loaded.

Codeigniter in shared ssl

I am not able to get codeigniter to work on my shared ssl url.
for example, on
https://nimrod.eukhosting.net/~nadavwei/myatar.co.cc/aaa
i get a 404 error
aaa is just a demo controller that should echo test
only the homepage - with no controller in the url - works
https://nimrod.eukhosting.net/~nadavwei/myatar.co.cc/
btw, i am using .htaccess
thanks
It looks like your provider is disabling .htaccess for the https server.
I am able to see your website here: https://nimrod.eukhosting.net/~nadavwei/myatar.co.cc/index.php/categories/26
But it won't work here: https://nimrod.eukhosting.net/~nadavwei/myatar.co.cc/categories/26
My guess is that their setup allows or disallows .htaccess based on the virtual domain, and since you are not using your virtual domain, it is being disabled. You should contact your hosting provider and see if they know or can provide more information.
You can also double check your .htaccess file, in case there is something about it specifying the virtual domain.
Also, as an FYI, you are going to have to modify your CodeIgniter configuration so that it dynamically the full path and turns on or off the index.php part of your URL based on whether or not the user is arriving via HTTPS:
$is_https = !empty($_SERVER['HTTPS']);
$config['base_url'] = $is_https ?
'https://nimrod.eukhosting.net/~nadavwei/myatar.co.cc/' :
'http://myatar.co.cc/';
$config['index_page'] = $is_https ? 'index.php' : '';
This should toggle the modes as necessary.

Codeigniter 404 status header with no reason

Hello all
I have a controller which calls a model which returns after a db query an array to my view which prints some json which i can see in my browser.The problem is that this page has a 404 status header for no reason.
Any suggestions?
A page that shouldn't exist is often sends a 404 header in CodeIgniter.
You could do one of the following
Check if you the controller/method exists
Check if you have any routing that may be pointing you to another controller/method
Check if that location can be browsed via a browser
If nothing works, it would be better if you posted some of your code, routing, etc that may help.

Resources