分页CodeIgniter覆盖基本URL

My website pagination is inside the "home" function in the "user_area" controller file. I followed the example from this page Pagination

The pagination works fine except that it messes my base_url. When I click the pagination links, and then click on a link in the website navbar, the "home" is added to all the links.

Any help is welcome.

Controller:

    public function home(){
    if($this->session->userdata('is_logged_in')){

        $this->load->model('model_match');
        $this->load->model('model_user');
        $this->load->model('model_msg');    

        $pagination = array();

        $pagination["total_rows"] = $this->model_match->countMatches();
        $pagination["per_page"] = 2;
        $pagination["uri_segment"] = 3;
        $choice = $pagination["total_rows"] / $pagination["per_page"];
        $pagination["num_links"] = round($choice);
        $pagination['base_url'] = base_url('user_area/home');
        $this->pagination->initialize($pagination);

        $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
        $data["videos"] =  $this->model_match->getAllMatches($pagination["per_page"], $page);
        $data["links"] = $this->pagination->create_links();


        $data['count_unread_msgs'] = $this->model_msg->countUnreadMsgs($this->session->userdata('user'));
        $data['count_unread_hearts'] = $this->model_msg->countUnreadHearts($this->session->userdata('user'));



        $data['user_name'] = $this->session->userdata('user');
        //$data['videos'] = $this->model_match->getAllMatches();
        $this->load->view('user/matches',$data);

        }else{
            redirect('home');
            }

    }

Nav Bar :

        <nav>      


                 <a  href="home">Home</a>   
                  <a  href="message_center">Messages</a>   
                 <a href="account">Account</a>

                   <a   href="library">Portfolio</a>
                 <a   href="favorites">Favorites</a>   
                 <a href="viewer-help.php">Help / FAQ </a> -->
                 <a  href="toolkit">Toolkit</a>   
                   <a href="<?php echo base_url()."login/logout";?>">Logout</a>


                <?php searchOptions();?>

    </nav>

theres your problem

<a href="toolkit">Toolkit</a> is a relative path link,

you should be doing something like this on all your nav links as a best practice:

<a href="<?php echo base_url('toolkit');?>">Toolkit</a>

or

<a href="<?=base_url('toolkit');?>">Toolkit</a>

if your server supports short open tags