Object not found when clicking hyperlink

1

Hello, I'm learning IC and I came across the following problem. When I click on a link in a home test, I would like to be transferred to another page and use another controller, but when clicking, I get this error:

Objeto não encontrado!

A URL requisitada não foi encontrada neste servidor. 
O link na página referida parece estar com algum erro ou desatualizado. .
Por favor informe o autor desta página sobre o erro.

This is my Home.php

class Home extends CI_Controller {

    function __construct(){
        parent::__construct();
    }

    public function index(){
        $this->load->view('pages/home/index');
    }
}

And this is my views / pages / home / index.php o:

<a href = "<?php echo site_url('application/controllers/ong'); ?>" class="btn btn-link">Ong</a>

htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
    
asked by anonymous 27.10.2018 / 03:39

1 answer

0

The error you are seeing is provided by Apache, when the URL you are trying to access does not exist inside the web server. Most likely you did not type the right URL.

See if this works: instead access only localhost (or 127.0.0.1 ), access the URL with localhost/*DIR*/home , where *DIR* is the name of the directory where the application was placed on the web server (for example , for C:\xampp\htdocs\proj_exemplo\ would be localhost/proj_exemplo/home ). Or, if .htaccess is incorrect, try accessing localhost/*DIR*/index.php/home/index to try to force location.

    
29.10.2018 / 17:28