I can't access the images in the file codeigniter

Viewed 44

When I go to the incoming link, it redirects to the home page and the url does not go.

File structure

-codeigniter-case
 --application
 --system
 --img
  ---jonatan.jpg

view

<img src="<?=base_url()?>codeigniter-case/img/jonatan.jpg">

// i get this output : http://localhost:8080/codeigniter-case/uploads/img/jonatan.png

.htaccess

RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} ! -f
RewriteCond %{REQUEST_FILENAME} ! -d
RewriteRule ^(.*)$ index.php/$1 [L]

config.php

$config['base_url'] = 'http://localhost:8080/';
$config['index_page'] = '';
1 Answers

You must enter your project folder name in base url

<img src="<?=base_url()?>uploads/img/jonatan.png">
$config['base_url'] = 'http://localhost:8080/projectFolderName/';
Related