I'm literally struggling to understand why, as it seems, I can't load any image to my local Codeigniter installation on XAMPP.
I have placed an img
folder into the application
folder, containing only an image named arrow.png
but I cannot access it nor show it on my views.
I have the suspect this might be a .htaccess problem but I have tried different solutions with no success. This is what I have at the moment:
Options FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt|assets|cache|themes|uploads)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
In my config PHP I've edited of course:
$config['index_page'] = '';
In my view called ordine.php
I called my image like this:
<img src="<?php echo base_url("img/arrow.png"); ?>" title="Go to Top" alt="Go to Top"/>
The generated URL seems right but the image doesn't shows. If I go directly on that link, I get a 404 error.
http://localhost/clientname/img/arrow.png
EDIT: Could it be something with my httpd.conf apache file, set up as the following?
Alias /bitnami/ "/Applications/XAMPP/xamppfiles/apache2/htdocs/"
Alias /bitnami "/Applications/XAMPP/xamppfiles/apache2/htdocs"
<Directory "/Applications/XAMPP/xamppfiles/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Thank you in advance for any suggestions and help about this.