I had created login page in codeigniter and made it default controller when the application is hit but I am getting 404 page not found error when the application is hit. Please find below code of controller as main.php config and route file changes placed. My controller name is main.php and the code is as follows
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Main extends CI_Controller {
//functions
function login()
{
$data['title'] = 'CodeIgniter Simple Login Form With Sessions';
$this->load->library('form_validation');
$this->load->view("login", $data);
}
htaccess
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
route file
$route['default_controller'] = 'main';
config file
$config['base_url'] = '';
$config['index_page'] = 'index.php';
$config['encryption_key'] = 'xRUqKhsoZ5qV6y3kqARFJFdPqJvp7X2z';