vendredi 29 décembre 2017

LARAVEL - cannot access my public folder via URL

I am trying to show image in my blade view.

I tried:

 <img src=>

Also:

<img src= /images/1514562220.jpg')>

If i type http://localhost:8000/public/images/1514562220.jpg in browser 404 page appear.

If i type http://localhost:8000/images/1514562220.jpg in browser i get ERR_INVALID_HTTP_RESPONSE.

When i inspect element in browser i see following adress:

http://localhost:8000/public/images/1514562220.jpg

but img is not showing

I dont know if it has something to do with it but there is some kind of block on icon.

enter image description here

My htaccess:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews -Indexes
</IfModule>

RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire