Well this is what I got so far, I do nt want to create another views,etc. I just wat to block all the IP address, or set one Io to have the accesss to these pages. And to do that I put this in my __construct
public function __construct()
{
parent::__construct();
$this->load->model('about_model');
$this->load->model('blog_model');
$this->load->model('categorias_model');
$this->load->model('cookies_model');
$this->load->model('news_model');
$this->load->model('portfolio_model');
$this->load->model('privacy_model');
$this->load->model('terms_model');
$this->load->model('skills_model');
$this->load->model('profesion_model');
$this->load->model('slider_model');
$this->load->library('pagination');
//// Block access to admin pages ////
//Here you check ip allowed or not
if (!in_array($this->input->ip_address(), array('107.208.103.39','2602:306:bd06:7270:fcdd:74c5:c591:dc4')))
{
// Either show 404
show_404();
// OR redirect somewhere else
redirect('admin');
}
}
I found ths tutorial on Stackoverflow, byt apprently I have to create an input as called "ip_address" and I do not know where should I create it, but as I said before I would like to avoid the creating of new controller, views/models etc.
I do Front-End development most of the time