无法重定向到新页面 - CodeIgniter

I have a login system that works, but on the redirect function it gives me the error The requested URL "http://localhost/musiclear/index.php/welcome" cannot be found or is not available. Please check the spelling or try again later.

This is where I am using it (login.php):

    function validate_credentials() {

    $this->load->model('membership_model');
    $query = $this->membership_model->validate();

    if ($query) { // if users credentials validated
        $data = array('usernames' => $this->input->post('username'), 
        'is_logged_in' => true);

        $this->session->set_userdata($data); //set session data
        redirect('welcome', 'refresh'); //redirect to home page
    } else { //incorrect username or password
        $this->index();
    }
}

This is where I am directing it to (welcome.php):

class Welcome extends CI_Controller {

public function index() {
    $this->home();
}

public function home() {
    $this->load->model('model_users');

    $data['title'] = 'MVC Cool Title'; // $title
    $data['page_header'] = 'Intro to MVC Design';
    $data['firstnames'] = $this->model_users->getFirstNames();
    // just stored the array of objects into $data['firstnames] it will be accessible in the views as $firstnames

    $data['users'] = $this->model_users->getUsers();

    $this->load->view('home_view', $data);
}
}

Im thinking it is something wrong with the path, or where its linking to but im not sure. This is my directory setup:

file setup

Can someone please tell me whats wrong and how I can make it link to my page? Thanks so much

Have you created the .htaccess in your application folder?

Maybe this can work for your project:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /musiclear/index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
    ErrorDocument 404 /musiclear/index.php
</IfModule>

You are welcome