I'm new to CI,

I have selected a database from table. Now want to create Pagination. The Pagination link showed up. But when I click page 2 the error message is a `404 Page Not Found`. How can I fix that?

This is the script -
**on Controller**

```
function post()
 {

   $table_row_count = $this->db->count_all('post');

   $config['base_url'] = 'http://localhost/septiyo/index.php/admin/page/';
   $config['total_rows'] = $table_row_count;
   $config['per_page'] = 10;
   $this->pagination->initialize($config);

    $this->load->model('admin_model');  
    $data_admin['dataadmin']=$this->admin_model->view_post_model();
    $this->load->view('post_view',$data_admin);

 }//end of funciton

```

**on Model**

```
public function view_post_model()
    {
        $hasil = $this->db->get('post');
        return $hasil->result();

    }//end funciton

```

**on View**

```
echo "<table border='1' cellpadding='1' cellspacing='0' align='center' width='600'>
     <tr>
        <th>Judul</th>
        <th>Posting</th>
        <th>Ketegori</th>
        <th>Tanggal</th>
        <th>Aksi</th>
     </tr>";
foreach($dataadmin as $row)
{
    //$this->load->helper('text');
    $post = $row->post;
    $string = word_limiter($post,10);

    echo "<tr>";    
    echo "<td>$row->title</td>";
    //echo "<td>$row->post</td>";
    echo "<td>$string</td>";
    echo "<td>$row->kategori</td>";
    echo "<td>$row->tgl</td>";
    echo "<td>";
    echo anchor('company_controller/view_edit_employee/'.$row->id, 'Edit')." | ";
    echo anchor('company_controller/confirm_delete_employee/'.$row->id, 'Hapus');
    echo "</td>";
    echo "</tr>";
}    

echo "</table><br>";
echo $this->pagination->create_links();

```

Can anyone help me fix this problem?