[eluser]julian0008[/eluser]
Here is my line of code below which displays an image from the uploads folder within the application folder using base_url()
Code:
<div id = "picture">
<img id = "main" src = "<? echo base_url() . 'application/uploads/default.jpg'; ?>" alt = "profilepic"/>
</div>
And this is my htaccess file located at the root directory of my CI installation
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /tutorial/
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
The problem is the image does not display. Instead, it displays the alt text. Is there something wrong with my htaccess? Did I miss something? Thanks for any help in advance!