I developed a web application for code igniter .. this is the first time I'm working on code ignition .. after developing a web application on my localhost.so I decided to put my application to fire code on a temporary free server .. so I downloaded my the site on this site is
1freehosting ... and then I imported my database .. after that I changed the database settings in the database.php file .. and also I changed the base url in the config.php file .. this is my http domain name : //hello.hostingsiteforfree.com/ ... so I changed it to this url .. but then I get the following error bku ... I donβt know what is going wrong .. I searched a lot, but nothing helps .. and also I forgot to mention that my .htaccess file is empty ..means there is not a single line
this is the error i get
404 Page Not Found
The page you requested was not found.
routes.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$route['default_controller'] = "loginController";
$route['404_override'] = '';
my controller
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class LoginController extends CI_Controller {
function index(){
$new['main_content'] = 'loginView';
$this->load->view('loginTemplate/template', $new);
}
function verifyUser(){
$data = array(
'username' => $this->input->post('username'),
'password' => $this->input->post('password')
);
$this->load->model('loginModel');
$query = $this->loginModel->validate($data);
if ($query){
$data = array(
'username' => $this->input->post('username'),
'is_logged_in' => true
);
$this->session->set_userdata($data);
redirect('sessionController/dashboard_area');
}
else
{
$this->index();
}
}
function logout()
{
$this->session->sess_destroy();
$this->index();
}
}
?>
configuration file
$config['base_url'] = 'http://hello.hostingsiteforfree.com/';
$config['index_page'] = 'index.php';
source
share