Hello! I'll be very brief. I'm having trouble setting a correct href="". After clicking on a link in the menu, it is pointing to the HOSTGATOR page '404 - page not found' here's the controller code:
class Posts extends CI_Controller {
//Página de listar posts
public function index()
{
// Carrega o model posts
$this->load->model('posts_model', 'posts');
// Criamos a array dados para armazenar os posts
// Executamos a função do posts_model getPosts
$data['posts'] = $this->posts->getPosts();
// Carregamos a view listarprodutos e passamos como parametros a array posts que guarda todos os posts
// da db posts
$this->load->view('listarposts', $data);
}
// Página de listar reiki
public function reiki()
{
// Carrega a model posts
$this->load->model('posts_model', 'posts');
// Carrega a view
$this->load->view('listarreiki');
}
}
Here's the view with href with the link:
<ul class="list-unstyled">
<li><a href="posts/reiki">Reiki</a></li>
</ul><span class="heading">Email</span>
I'm now learning codeigniter and using it for a website I'm developing. Would it have to be modified in routes.php or autoload.php? Someone could help me.